예제 #1
0
 def test_load_group_file_ok(self):
   body = '\n'.join(['', 'b', 'a', ''])
   expected = [
     auth.Identity.from_bytes('user:[email protected]'),
     auth.Identity.from_bytes('user:[email protected]'),
   ]
   self.assertEqual(expected, importer.load_group_file(body, 'example.com'))
예제 #2
0
 def test_load_group_file_ok(self):
   body = '\n'.join(['', 'b', 'a', 'a', ''])
   expected = [
     auth.Identity.from_bytes('user:[email protected]'),
     auth.Identity.from_bytes('user:[email protected]'),
   ]
   self.assertEqual(expected, importer.load_group_file(body, 'example.com'))
예제 #3
0
 def test_load_group_file_bad_id(self):
     body = 'bad id'
     with self.assertRaises(importer.BundleBadFormatError):
         importer.load_group_file(body, 'example.com')
예제 #4
0
 def test_load_group_file_gtempaccount(self):
     self.assertEqual([auth.Identity.from_bytes('user:[email protected]')],
                      importer.load_group_file(
                          r'*****@*****.**', None))
예제 #5
0
 def test_load_group_file_bad_id(self):
   body = 'bad id'
   with self.assertRaises(importer.BundleBadFormatError):
     importer.load_group_file(body, 'example.com')