don't use REMOTE_USER in tests

This commit is contained in:
Unrud 2017-06-02 12:43:44 +02:00
parent 6edaf27a38
commit 428abf10de

View File

@ -791,7 +791,8 @@ class BaseRequestsMixIn:
def test_principal_collection_creation(self): def test_principal_collection_creation(self):
"""Verify existence of the principal collection.""" """Verify existence of the principal collection."""
status, headers, answer = self.request( status, headers, answer = self.request(
"PROPFIND", "/user/", REMOTE_USER="user") "PROPFIND", "/user/", HTTP_AUTHORIZATION=(
"Basic " + base64.b64encode(b"user:").decode()))
assert status == 207 assert status == 207
def test_existence_of_root_collections(self): def test_existence_of_root_collections(self):
@ -841,7 +842,9 @@ class BaseRequestsMixIn:
"""Verify that the hooks runs when a new user is created.""" """Verify that the hooks runs when a new user is created."""
self.configuration["storage"]["hook"] = ( self.configuration["storage"]["hook"] = (
"mkdir %s" % os.path.join("collection-root", "created_by_hook")) "mkdir %s" % os.path.join("collection-root", "created_by_hook"))
status, headers, answer = self.request("GET", "/", REMOTE_USER="user") status, headers, answer = self.request(
"GET", "/", HTTP_AUTHORIZATION=(
"Basic " + base64.b64encode(b"user:").decode()))
assert status == 303 assert status == 303
status, headers, answer = self.request("PROPFIND", "/created_by_hook/") status, headers, answer = self.request("PROPFIND", "/created_by_hook/")
assert status == 207 assert status == 207