Пример #1
0
 def test_it_stores_a_valid_sid(self):
     service = AMBearer('drm', 'abcd01')
     self.assertEqual('abcd01', service.sid)
Пример #2
0
 def lookup_am(self, type=None, sid=None):
     service = AMBearer(type, sid)
     return self.__lookup(service)
Пример #3
0
 def test_it_constructs_an_fqdn(self):
     service = AMBearer('amss', 'abcd01')
     self.assertEqual('abcd01.amss.radiodns.org', service.fqdn())
Пример #4
0
 def test_it_refuses_an_invalid_type(self):
     with self.assertRaises(ValueError):
         AMBearer('nonsense', 'abcd01')
Пример #5
0
 def test_it_refuses_an_invalid_sid(self):
     with self.assertRaises(ValueError):
         AMBearer('drm', 'zzzz01')
Пример #6
0
 def test_it_transforms_an_uppercase_type(self):
     service = AMBearer('DRM', 'abcd01')
     self.assertEqual('abcd01', service.sid)
Пример #7
0
 def test_it_transforms_an_uppercase_sid(self):
     service = AMBearer('drm', 'ABCD01')
     self.assertEqual('abcd01', service.sid)