Example #1
0
 def test_delete_environment_allowed_with_environment(self):
     self.delete_environment = tables.DeleteEnvironment()
     test_environment = mock.Mock()
     test_environment.status = "test"
     self.assertTrue(self.delete_environment.allowed("", test_environment))
Example #2
0
 def test_delete_environment_action(self, delete):
     self.delete_environment = tables.DeleteEnvironment()
     self.delete_environment.action("", "")
     self.assertTrue(delete.called)
Example #3
0
 def test_delete_environment_action_fail(self, exceptions, reverse):
     self.delete_environment = tables.DeleteEnvironment()
     exceptions.handle.return_value = ""
     self.delete_environment.action("", "")
     self.assertTrue(reverse.called)
Example #4
0
 def test_delete_environment_allowed_without_environment(self, row_actions):
     self.delete_environment = tables.DeleteEnvironment()
     row_actions.return_value = True
     self.assertTrue(self.delete_environment.allowed("", ""))