Ejemplo n.º 1
0
 def test_it_returns_text_type(self, pyramid_request):
     pyramid_request.domain = str(pyramid_request.domain)
     assert type(util.auth_domain(pyramid_request)) == text_type
Ejemplo n.º 2
0
 def test_it_allows_overriding_request_domain(self, pyramid_request):
     pyramid_request.registry.settings['h.auth_domain'] = 'foo.org'
     assert util.auth_domain(pyramid_request) == u'foo.org'
Ejemplo n.º 3
0
 def test_it_returns_the_request_domain(self, pyramid_request):
     assert util.auth_domain(pyramid_request) == pyramid_request.domain
Ejemplo n.º 4
0
 def test_it_returns_text_type(self, pyramid_request):
     pyramid_request.domain = str(pyramid_request.domain)
     assert type(util.auth_domain(pyramid_request)) == text_type
Ejemplo n.º 5
0
 def test_it_allows_overriding_request_domain(self, pyramid_request):
     pyramid_request.registry.settings['h.auth_domain'] = 'foo.org'
     assert util.auth_domain(pyramid_request) == u'foo.org'
Ejemplo n.º 6
0
 def test_it_returns_the_request_domain(self, pyramid_request):
     assert util.auth_domain(pyramid_request) == pyramid_request.domain