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'))
Exemple #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'))
Exemple #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')
 def test_load_group_file_gtempaccount(self):
     self.assertEqual([auth.Identity.from_bytes('user:[email protected]')],
                      importer.load_group_file(
                          r'*****@*****.**', None))
 def test_load_group_file_bad_id(self):
   body = 'bad id'
   with self.assertRaises(importer.BundleBadFormatError):
     importer.load_group_file(body, 'example.com')