Fixed tests so they work in new packaging setup
parent
f40bf2fb95
commit
f6272b100f
|
@ -1,5 +1,6 @@
|
|||
from django.test import TestCase
|
||||
from GeoffreyApp.GeoffreyApp.models import *
|
||||
from GeoffreyApp.models import *
|
||||
from GeoffreyApp.api.commands import *
|
||||
from time import sleep
|
||||
|
||||
# Create your tests here.
|
||||
|
@ -42,13 +43,13 @@ class CommandsAPITestCase(TestCase):
|
|||
self.farm.owner.add(self.player)
|
||||
|
||||
def test_register(self):
|
||||
register(player_name="DrVakky", discord_uuid="229423434256351233")
|
||||
register(player_name="Notch", discord_uuid="229423434256351233")
|
||||
|
||||
count = Player.objects.filter(mc_uuid__iexact="7afbf6632bf049ef915f22e81b298d17").count()
|
||||
count = Player.objects.filter(mc_uuid__iexact="069a79f444e94726a5befca90e38aaf5").count()
|
||||
|
||||
self.assertEqual(count, 1)
|
||||
|
||||
self.assertRaises(PlayerInDBError, register, player_name="DrVakky", discord_uuid="229423434256351233")
|
||||
self.assertRaises(PlayerInDBError, register, player_name="Notch", discord_uuid="229423434256351233")
|
||||
|
||||
def test_add_base(self):
|
||||
add_base(x_pos=0, z_pos=0, name=None, discord_uuid=DISCORD_UUID)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
from django.test import TestCase
|
||||
from GeoffreyApp.GeoffreyApp.util import create_token
|
||||
from GeoffreyApp.util import create_token
|
||||
|
||||
|
||||
class TokenAPITestCase(TestCase):
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
from django.test import TestCase
|
||||
from GeoffreyApp.GeoffreyApp.mcm_api import get_player
|
||||
from GeoffreyApp.mcm_api import get_player
|
||||
# Create your tests here.
|
||||
|
||||
UUID = "fe7e84132570458892032b69ff188bc3"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
from django.test import TestCase
|
||||
from GeoffreyApp.GeoffreyApp.minecraft_api import grab_playername, grab_UUID
|
||||
from GeoffreyApp.minecraft_api import grab_playername, grab_UUID
|
||||
# Create your tests here.
|
||||
|
||||
UUID = "fe7e84132570458892032b69ff188bc3"
|
||||
|
|
Loading…
Reference in New Issue