I am trying to write unit tests that would test my bottle app. The problem is that I get KeyError wsgi.input which probablly means I am trying to avoid the bottle enviornment and that I need to mock the request? I am mocking the db engine and then in my test method I am trying to call the controller method and asserting them
Any idea how can I mock the request, anyone done this before?
submitted by /u/Kubura33
[link] [comments]
r/learnpython I am trying to write unit tests that would test my bottle app. The problem is that I get KeyError wsgi.input which probablly means I am trying to avoid the bottle enviornment and that I need to mock the request? I am mocking the db engine and then in my test method I am trying to call the controller method and asserting them Any idea how can I mock the request, anyone done this before? submitted by /u/Kubura33 [link] [comments]
I am trying to write unit tests that would test my bottle app. The problem is that I get KeyError wsgi.input which probablly means I am trying to avoid the bottle enviornment and that I need to mock the request? I am mocking the db engine and then in my test method I am trying to call the controller method and asserting them
Any idea how can I mock the request, anyone done this before?
submitted by /u/Kubura33
[link] [comments]