def randomItem(self): """ method returns a random item, using the itemFactory method Precondition: None Postcondition: returns random Item """ return Factory.itemFactory().create()
def test_artifact_room_class_and_methods(): item = Factory.itemFactory() ar = ArtifactRoom(2, 2, ["text"], item=item) x, y = ar.getCoords() desc = ar.getText() assert (x == 2 and y == 2 and desc == "text")