Skip to content

Commit

Permalink
tests: login tests also does logout
Browse files Browse the repository at this point in the history
  • Loading branch information
robvdl committed Mar 8, 2024
1 parent d65ea3e commit e514526
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/test_login.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def handle_starttag(self, tag, attrs):
self.return_url = tag_attrs["value"]


def test_login(testapp, settings):
def test_login_logout(testapp, settings):
response = testapp.get("/login/", status=200)
parser = LoginHTMLParser()
parser.feed(response.text)
Expand All @@ -40,6 +40,10 @@ def test_login(testapp, settings):
response = testapp.get("/", status=200)
assert "Sambal Login" not in response.text

testapp.get("/logout/", status=302)
response = testapp.get("/", status=200)
assert "Sambal Login" in response.text


def test_login_required(testapp):
response = testapp.get("/", status=200)
Expand Down

0 comments on commit e514526

Please sign in to comment.