2018-06-03 02:42:31 +00:00
|
|
|
from unittest import TestCase
|
|
|
|
from MinecraftAccountInfoGrabber import *
|
2018-08-05 22:51:55 +00:00
|
|
|
from BotErrors import UsernameLookupFailed
|
2018-06-03 02:42:31 +00:00
|
|
|
|
|
|
|
|
|
|
|
class TestMinecraftInfoGrabber(TestCase):
|
|
|
|
|
|
|
|
def test_handle_data(self):
|
|
|
|
self.assertEqual(grab_UUID('ZeroHD'), 'fe7e84132570458892032b69ff188bc3')
|
|
|
|
|
|
|
|
def test_grab_playername(self):
|
2018-07-23 02:51:22 +00:00
|
|
|
self.assertEqual(grab_playername('01c29c443f8d4ab490a56919407a5bd2'), 'CoolZero123')
|
2018-06-30 15:07:56 +00:00
|
|
|
|
|
|
|
def test_grab_playername_wrong_case(self):
|
|
|
|
self.assertEqual(grab_UUID('zerohd'), 'fe7e84132570458892032b69ff188bc3')
|
2018-08-05 22:51:55 +00:00
|
|
|
|
|
|
|
def test_grab_invalid_player(self):
|
|
|
|
self.assertRaises(UsernameLookupFailed, grab_UUID, 'lsdlkjsljglfjgldkj')
|