Skip to content

Commit

Permalink
Fix: tests compatibility with bddrest >= 6.1.
Browse files Browse the repository at this point in the history
  • Loading branch information
pylover committed Aug 31, 2024
1 parent 9fad454 commit 9cb1acb
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions tests/test_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ def test_server_index(ymdapp, ymdserver, mockupfs):

ymdapp.settings.root = root
ymdapp.ready()
with ymdserver(url='/index.md'):
with ymdserver(path='/index.md'):
assert status == 200
assert response.text.startswith('<!DOCTYPE html>')


def test_server_css(ymdapp, ymdserver):
ymdapp.ready()
with ymdserver(url='/index.css'):
with ymdserver(path='/index.css'):
assert status == 200
assert response.text.startswith('/* yhttp-markdown css */')

Expand All @@ -53,16 +53,16 @@ def test_server_exclude(ymdapp, ymdserver, mockupfs):
assert status == 200
assert response.text.startswith('<!DOCTYPE html>')

when(url='/index.md')
when(path='/index.md')
assert status == 200

when(url='/foo.md')
when(path='/foo.md')
assert status == 404

when(url='/bar')
when(path='/bar')
assert status == 404

when(url='/bar/index.md')
when(path='/bar/index.md')
assert status == 404

ymdapp.settings.merge('''
Expand Down Expand Up @@ -100,7 +100,7 @@ def test_server_notfound(ymdapp, ymdserver, mockupfs):
with ymdserver():
assert status == 200

when(url='/bar.md')
when(path='/bar.md')
assert status == 404


Expand Down

0 comments on commit 9cb1acb

Please sign in to comment.