def test_create(self): mock_context = mock.Mock() policy = Policy(mock_context, Config2) policy.create()
def test_delete(self): mock_context = mock.Mock() policy = Policy(mock_context, Config1) policy.delete()
def test_exists(self): mock_context = mock.Mock() policy = Policy(mock_context, Config1) self.assertTrue(policy.exists())
def test_not_exists(self): mock_context = mock.Mock() policy = Policy(mock_context, Config2) self.assertFalse(policy.exists())
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'])