Example #1
0
 def test_create(self):
     mock_context = mock.Mock()
     policy = Policy(mock_context, Config2)
     policy.create()
Example #2
0
 def test_delete(self):
     mock_context = mock.Mock()
     policy = Policy(mock_context, Config1)
     policy.delete()
Example #3
0
 def test_exists(self):
     mock_context = mock.Mock()
     policy = Policy(mock_context, Config1)
     self.assertTrue(policy.exists())
Example #4
0
 def test_not_exists(self):
     mock_context = mock.Mock()
     policy = Policy(mock_context, Config2)
     self.assertFalse(policy.exists())
Example #5
0
 def test_delete(self):
     mock_context = mock.Mock()
     policy = Policy(mock_context, Config1)
     policy.delete()
Example #6
0
 def test_create(self):
     mock_context = mock.Mock()
     policy = Policy(mock_context, Config2)
     policy.create()
Example #7
0
 def test_not_exists(self):
     mock_context = mock.Mock()
     policy = Policy(mock_context, Config2)
     self.assertFalse(policy.exists())
Example #8
0
 def test_exists(self):
     mock_context = mock.Mock()
     policy = Policy(mock_context, Config1)
     self.assertTrue(policy.exists())
Example #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'])