You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
560 B
23 lines
560 B
7 years ago
|
from pyramid.httpexceptions import HTTPFound
|
||
|
from pyramid.testing import DummyRequest
|
||
|
|
||
|
from ... import ( # noqa: F401
|
||
|
app_config,
|
||
|
dbsession,
|
||
|
get_example_user,
|
||
|
get_post_request
|
||
|
)
|
||
|
|
||
|
|
||
|
# test for account resource root
|
||
|
|
||
|
def test_account_redirect(dbsession): # noqa: F811
|
||
|
''' redirect on root of account resource '''
|
||
|
from ordr.views.account import account
|
||
|
|
||
|
request = DummyRequest(dbsession=dbsession)
|
||
|
result = account(None, request)
|
||
|
|
||
|
assert isinstance(result, HTTPFound)
|
||
|
assert result.location == 'http://example.com//'
|