Example #1
0
 def test_create_environment_action(self, create):
     self.create_environment = tables.CreateEnvironment()
     self.create_environment.action("", "")
     self.assertTrue(create.called)
Example #2
0
 def test_create_environment_action_fail(self, exceptions, reverse):
     self.create_environment = tables.CreateEnvironment()
     exceptions.handle.return_value = ""
     self.create_environment.action("", "")
     self.assertTrue(reverse.called)
Example #3
0
 def test_create_environment_allowed(self):
     self.create_environment = tables.CreateEnvironment()
     self.create_environment.table = mock.Mock()
     self.create_environment.table.data.return_value = True
     self.assertTrue(self.create_environment.allowed("test", "test"))