示例#1
0
 def test_create(self):
     mock_context = mock.Mock()
     policy = Policy(mock_context, Config2)
     policy.create()
示例#2
0
 def test_delete(self):
     mock_context = mock.Mock()
     policy = Policy(mock_context, Config1)
     policy.delete()
示例#3
0
 def test_exists(self):
     mock_context = mock.Mock()
     policy = Policy(mock_context, Config1)
     self.assertTrue(policy.exists())
示例#4
0
 def test_not_exists(self):
     mock_context = mock.Mock()
     policy = Policy(mock_context, Config2)
     self.assertFalse(policy.exists())
示例#5
0
 def test_delete(self):
     mock_context = mock.Mock()
     policy = Policy(mock_context, Config1)
     policy.delete()
示例#6
0
 def test_create(self):
     mock_context = mock.Mock()
     policy = Policy(mock_context, Config2)
     policy.create()
示例#7
0
 def test_not_exists(self):
     mock_context = mock.Mock()
     policy = Policy(mock_context, Config2)
     self.assertFalse(policy.exists())
示例#8
0
 def test_exists(self):
     mock_context = mock.Mock()
     policy = Policy(mock_context, Config1)
     self.assertTrue(policy.exists())
示例#9
0
 def test_properties(self):
     mock_context = mock.Mock()
     policy = Policy(mock_context, Config1)
     self.assertEqual(policy.name, Config1['name'])
     self.assertEqual(policy.document, Config1['document'])
     self.assertEqual(policy.description, Config1['description'])