Moved test cases to their own directory

doc_update
Joey Hines 2018-12-17 10:13:37 -06:00
parent b8d54ccdcf
commit 59bac55fd1
5 changed files with 35 additions and 15 deletions

0
test/__init__.py 100644
View File

View File

@ -0,0 +1,17 @@
from django.test import TestCase
from GeoffreyApp.mcm_api import get_player
# Create your tests here.
UUID = "fe7e84132570458892032b69ff188bc3"
USERNAME = "ZeroHD"
class MCM_APITestCase(TestCase):
def test_get_player(self):
players = get_player(UUID)
if len(players) != 1:
self.fail()
else:
self.assertEqual(players[0]["username"], USERNAME)

View File

@ -0,0 +1,18 @@
from django.test import TestCase
from GeoffreyApp.minecraft_api import grab_playername, grab_UUID
# Create your tests here.
UUID = "fe7e84132570458892032b69ff188bc3"
USERNAME = "ZeroHD"
class MinecraftAPITestCase(TestCase):
def test_grab_playername(self):
player_name = grab_playername(UUID)
self.assertEqual(player_name, USERNAME)
def test_grab_uuid(self):
player_uuid = grab_UUID(USERNAME)
self.assertEqual(player_uuid, UUID)

View File

@ -1,15 +0,0 @@
from django.test import TestCase
from GeoffreyApp.MCM_api import get_player
# Create your tests here.
class MCM_api_test(TestCase):
def test_get_player(self):
uuid = "fe7e84132570458892032b69ff188bc3"
players = get_player(uuid)
if len(players) != 1:
self.fail()
else:
self.assertEqual(players[0]["id"], 4146)