예제 #1
0
def other_character():
    """Create another Character instance for all tests to share."""
    _character = Character(savable=False)
    _character.active = True
    _character.name = "Target"
    _character.session = _other_session
    return _character
예제 #2
0
 def test_room_chars(self):
     """Test that a room's character list functions properly."""
     assert not self.room.chars
     char = Character()
     char.resume(quiet=True)
     char.room = self.room
     assert set(self.room.chars) == {char}
     del Character._caches[char.get_key_name()][char.key]
     del char
     gc.collect()
     assert not self.room.chars
예제 #3
0
 def test_character_create(self):
     """Test that we can create a new character instance."""
     assert Character()
예제 #4
0
def character():
    """Create a Character instance for all tests to share."""
    return Character(savable=False)