Skip to content

Commit

Permalink
Skip test creating principal with whitespaces on Windows
Browse files Browse the repository at this point in the history
It's not allowed by the file system.
  • Loading branch information
Unrud committed Sep 11, 2017
1 parent 282a759 commit 1bd4e6a
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions radicale/tests/test_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,14 @@ def test_htpasswd_bcrypt(self):
def test_htpasswd_multi(self):
self._test_htpasswd("plain", "ign:ign\ntmp:bepo")

def test_htpasswd_whitespace(self):
self._test_htpasswd("plain", " tmp : bepo ", (
(" tmp ", " bepo ", 207), ("tmp", "bepo", 401)))
@pytest.mark.skipif(os.name == "nt", reason="leading and trailing "
"whitespaces not allowed in file names")
def test_htpasswd_whitespace_preserved(self):
self._test_htpasswd("plain", " tmp : bepo ",
((" tmp ", " bepo ", 207),))

def test_htpasswd_whitespace_not_trimmed(self):
self._test_htpasswd("plain", " tmp : bepo ", (("tmp", "bepo", 401),))

def test_htpasswd_comment(self):
self._test_htpasswd("plain", "#comment\n #comment\n \ntmp:bepo\n\n")
Expand Down

0 comments on commit 1bd4e6a

Please sign in to comment.