isgd_test.py 562 B

12345678910111213141516
  1. import unittest
  2. from terroroftinytown.services.isgd import Isgd6Service
  3. from terroroftinytown.services.registry import registry
  4. class TestIsgd(unittest.TestCase):
  5. def test_registry(self):
  6. self.assertTrue('isgd' in registry)
  7. self.assertTrue('isgd_6' in registry)
  8. def test_6(self):
  9. service = Isgd6Service({'alphabet': '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_'})
  10. self.assertEqual('Ph09LO', service.transform_sequence_num(0))
  11. self.assertEqual('h21rxr', service.transform_sequence_num(10))