class SecurityGroupViewTests(BaseViewTestCase): request = testing.DummyRequest() view = SecurityGroupView(request) def test_is_tagged_view(self): """Security group view should inherit from TaggedItemView""" self.assertTrue(isinstance(self.view, TaggedItemView)) def test_item_view(self): itemview = SecurityGroupView(self.request).securitygroup_view() self.assertEqual(itemview.get('security_group'), None) self.assertTrue(itemview.get('securitygroup_form') is not None) self.assertTrue(itemview.get('delete_form') is not None) def test_update_view(self): updateview = SecurityGroupView(self.request).securitygroup_update() self.assertEqual(updateview.get('security_group'), None) def test_delete_view(self): deleteview = SecurityGroupView(self.request).securitygroup_delete() self.assertTrue(deleteview is not None)
def test_delete_view(self): deleteview = SecurityGroupView(self.request).securitygroup_delete() self.assertTrue(deleteview is not None)
def test_update_view(self): updateview = SecurityGroupView(self.request).securitygroup_update() self.assertEqual(updateview.get('security_group'), None)
def test_item_view(self): itemview = SecurityGroupView(self.request).securitygroup_view() self.assertEqual(itemview.get('security_group'), None) self.assertTrue(itemview.get('securitygroup_form') is not None) self.assertTrue(itemview.get('delete_form') is not None)