This method makes it hard to test. In particular, imagine you want to test just this function in isolation. You'd have to set `self.currentItem` and then invoke it, which would mean that the test would have to know about the internals of the class. Instead, I would have it take a parameter, which is `self.currentItem['types_available']`:

```python
def choose_random_itemtype(self, types_available):
```

That way, you could imagine writing tests for it and pumping in with ease different values.