Пример #1
0
 def test_get_by_invalid_name(self):
     group = ops.group(name=helper.uuid())
     self.assertTrue(group.id is None)
     self.assertTrue(group.name is None)
     self.assertFalse(group)
Пример #2
0
 def test_get_by_invalid_id(self):
     group = ops.group(id=-1)
     self.assertTrue(group.id is None)
     self.assertTrue(group.name is None)
     self.assertFalse(group)
Пример #3
0
 def test_get_by_name(self):
     group = ops.group(name=self.name)
     self.assertEqual(group.id, self.id)
     self.assertTrue(group)
Пример #4
0
 def test_default(self):
     group = ops.group(self.name)
     self.assertEqual(group.id, self.id)
     self.assertTrue(group)
Пример #5
0
 def test_get_by_id(self):
     group = ops.group(id=self.id)
     self.assertEqual(group.name, self.name)
     self.assertTrue(group)
Пример #6
0
 def test_get_by_invalid_name(self):
     group = ops.group(name=helper.uuid())
     self.assertTrue(group.id is None)
     self.assertTrue(group.name is None)
     self.assertFalse(group)
Пример #7
0
 def test_get_by_name(self):
     group = ops.group(name=self.name)
     self.assertEqual(group.id, self.id)
     self.assertTrue(group)
Пример #8
0
 def test_get_by_invalid_id(self):
     group = ops.group(id=-1)
     self.assertTrue(group.id is None)
     self.assertTrue(group.name is None)
     self.assertFalse(group)
Пример #9
0
 def test_get_by_id(self):
     group = ops.group(id=self.id)
     self.assertEqual(group.name, self.name)
     self.assertTrue(group)
Пример #10
0
 def test_default(self):
     group = ops.group(self.name)
     self.assertEqual(group.id, self.id)
     self.assertTrue(group)