2018-06-03 02:42:31 +00:00
|
|
|
from unittest import TestCase
|
2018-08-12 19:00:04 +00:00
|
|
|
|
2018-06-03 02:42:31 +00:00
|
|
|
from MinecraftAccountInfoGrabber import *
|
|
|
|
|
|
|
|
|
|
|
|
class TestMinecraftInfoGrabber(TestCase):
|
|
|
|
|
|
|
|
def test_handle_data(self):
|
2018-09-13 19:00:59 +00:00
|
|
|
self.assertEqual(grab_UUID('YMCA'), '5c084bd60c6a417ba084e2c5a382d0e1')
|
2018-06-03 02:42:31 +00:00
|
|
|
|
|
|
|
def test_grab_playername(self):
|
2018-09-13 19:00:59 +00:00
|
|
|
self.assertEqual(grab_playername('5c084bd60c6a417ba084e2c5a382d0e1'), 'YMCA')
|
2018-06-30 15:07:56 +00:00
|
|
|
|
|
|
|
def test_grab_playername_wrong_case(self):
|
2018-09-13 19:00:59 +00:00
|
|
|
self.assertEqual(grab_UUID('ymca'), '5c084bd60c6a417ba084e2c5a382d0e1')
|
2018-08-05 22:51:55 +00:00
|
|
|
|
|
|
|
def test_grab_invalid_player(self):
|
|
|
|
self.assertRaises(UsernameLookupFailed, grab_UUID, 'lsdlkjsljglfjgldkj')
|