Ran black on sources

This commit is contained in:
Griatch 2020-01-18 00:15:02 +01:00
parent 5e5f3efc24
commit db17ece61b
4 changed files with 73 additions and 45 deletions

View file

@ -1042,20 +1042,23 @@ class TestBuilding(CommandTest):
self.call(building.CmdFind(), "/room Obj", "No Matches")
self.call(building.CmdFind(), "/exit Obj", "No Matches")
self.call(building.CmdFind(), "/exact Obj", "One Match")
# Test multitype filtering
with mock.patch('evennia.commands.default.building.CHAR_TYPECLASS', 'evennia.objects.objects.DefaultCharacter'):
with mock.patch(
"evennia.commands.default.building.CHAR_TYPECLASS",
"evennia.objects.objects.DefaultCharacter",
):
self.call(building.CmdFind(), "/char/room Obj", "No Matches")
self.call(building.CmdFind(), "/char/room/exit Char", "2 Matches")
self.call(building.CmdFind(), "/char/room/exit/startswith Cha", "2 Matches")
# Test null search
self.call(building.CmdFind(), "=", "Usage: ")
# Test bogus dbref range with no search term
self.call(building.CmdFind(), "= obj", "Invalid dbref range provided (not a number).")
self.call(building.CmdFind(), "= #1a", "Invalid dbref range provided (not a number).")
# Test valid dbref ranges with no search term
self.call(building.CmdFind(), "=#1", "7 Matches(#1-#7)")
self.call(building.CmdFind(), "=1-2", "2 Matches(#1-#2):")
@ -1063,7 +1066,7 @@ class TestBuilding(CommandTest):
self.call(building.CmdFind(), "=1- #2", "2 Matches(#1-#2):")
self.call(building.CmdFind(), "=1-#2", "2 Matches(#1-#2):")
self.call(building.CmdFind(), "=#1-2", "2 Matches(#1-#2):")
def test_script(self):
self.call(building.CmdScript(), "Obj = ", "No scripts defined on Obj")
self.call(
@ -1500,4 +1503,4 @@ class TestSystemCommands(CommandTest):
mock_channeldb.objects.get_channel = mock.MagicMock(return_value=channel)
self.call(syscommands.SystemSendToChannel(), "public:Hello")
channel.msg.assert_called()
channel.msg.assert_called()