Ejemplo n.º 1
0
 def test_kwargs_missing(self):
     with raises(Exception):
         controller = SampleActionController()
         controller.execute(action="kwargs_missing")
Ejemplo n.º 2
0
 def tests_exception_occuring_within_action(self):
     with raises(TypeError):
         controller = SampleActionController()
         controller.execute(action="exception")
Ejemplo n.º 3
0
 def test_blank_response(self):
     controller = SampleActionController()
     controller.request = Request.from_environ(sample_environ())
     result = controller.execute(action="blank")
     assert isinstance(result, dict)
Ejemplo n.º 4
0
 def test_execute_result(self):
     controller = SampleActionController()
     assert controller.execute(action="something") == "something_action"
     assert controller.execute(action="blah") == "blah_action"
Ejemplo n.º 5
0
 def tests_exception_occuring_within_action(self):
     with raises(TypeError):
         controller = SampleActionController()
         controller.execute(action='exception')
Ejemplo n.º 6
0
 def test_kwargs_missing(self):
     with raises(Exception):
         controller = SampleActionController()
         controller.execute(action='kwargs_missing')
Ejemplo n.º 7
0
 def test_execute_result(self):
     controller = SampleActionController()
     assert controller.execute(action='something') == 'something_action'
     assert controller.execute(action='blah') == 'blah_action'
Ejemplo n.º 8
0
 def test_blank_response(self):
     controller = SampleActionController()
     controller.request = Request.from_environ(sample_environ())
     result = controller.execute(action='blank')
     assert isinstance(result, dict)
 def test_execute_result(self):
     controller = SampleActionController()
     assert controller.execute(action='something') == 'something_action'
     assert controller.execute(action='blah') == 'blah_action'