Skip to content

Commit

Permalink
Merge 2527484 into 44d5b92
Browse files Browse the repository at this point in the history
  • Loading branch information
josephmancuso committed Sep 30, 2018
2 parents 44d5b92 + 2527484 commit 10a1015
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions masonite/helpers/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ def get(url, controller):
Returns:
masonite.routes.Get -- The Masonite Get class.
"""

from masonite.routes import Get

return Get().route(url, controller)
Expand Down
2 changes: 2 additions & 0 deletions masonite/request.py
Original file line number Diff line number Diff line change
Expand Up @@ -562,6 +562,7 @@ def redirect(self, route, params={}):
"""

self.redirect_url = self.compile_route_to_url(route, params)
self.status(302)
return self

def redirect_to(self, route_name, params={}):
Expand All @@ -580,6 +581,7 @@ def redirect_to(self, route_name, params={}):
"""

self.redirect_url = self._get_named_route(route_name, params)
self.status(302)

return self

Expand Down
3 changes: 2 additions & 1 deletion tests/test_requests.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@
class TestRequest:

def setup_method(self):
self.app = App()
self.request = Request(wsgi_request).key(
'NCTpkICMlTXie5te9nJniMj9aVbPM6lsjeq5iDZ0dqY=')
'NCTpkICMlTXie5te9nJniMj9aVbPM6lsjeq5iDZ0dqY=').load_app(self.app)

def test_request_is_callable(self):
""" Request should be callable """
Expand Down

0 comments on commit 10a1015

Please sign in to comment.