Moved test cases to their own directory
parent
b8d54ccdcf
commit
59bac55fd1
|
@ -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)
|
|
@ -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)
|
15
tests.py
15
tests.py
|
@ -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)
|
|
Loading…
Reference in New Issue