From 9f3a60d3c02d8957785cddf6345cc1c7fbc0071b Mon Sep 17 00:00:00 2001 From: Joey Hines Date: Fri, 11 Jan 2019 16:42:23 -0600 Subject: [PATCH] Fixed commands so all tests are passing --- api/commands.py | 2 +- test/test_commands.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/api/commands.py b/api/commands.py index f144b98..1a88c17 100644 --- a/api/commands.py +++ b/api/commands.py @@ -100,7 +100,7 @@ def register(player_name, discord_uuid): try: get_player(mc_uuid=mc_uuid) raise PlayerInDBError - except Player.DoesNotExist: + except PlayerNotFound: player = Player.objects.create(name=player_name, mc_uuid=mc_uuid, discord_uuid=discord_uuid) player.save() return player.json diff --git a/test/test_commands.py b/test/test_commands.py index 555c096..3868beb 100644 --- a/test/test_commands.py +++ b/test/test_commands.py @@ -107,7 +107,7 @@ class CommandsAPITestCase(TestCase): self.populate() location = info(location_name="test") - self.assertEqual(location["Name"], "test") + self.assertEqual(location["name"], "test") def test_tunnel(self): self.populate()