Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
cyrillkuettel committed Jun 23, 2024
1 parent a993476 commit 77b13c5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
2 changes: 0 additions & 2 deletions src/privatim/forms/fields/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -462,9 +462,7 @@ def populate_obj(self, obj: object, name: str) -> None:
output: list[GeneralFile] = []
print(self.entries)

# for field, file in zip_longest(self.entries, files): print('l');
for field, file in zip_longest(self.entries, files):
print('l')
if field is None:
# breakpoint()
# this generally shouldn't happen, but we should
Expand Down
8 changes: 2 additions & 6 deletions tests/views/client/test_views_consultation.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,20 +129,16 @@ def test_view_edit_consultation(client):
page = page.form.submit().follow()

# assert we are redirected to the edited consultation:
# assert f'consultation/{str(consultation_id)}' in page.request.url
assert f'consultation/{str(consultation_id)}' in page.request.url

# navigate with id to verify the edits
page = client.get(f'/consultations/{str(consultation_id)}')
page = client.get(f'/consultation/{str(consultation_id)}')

assert 'updated description' in page
assert 'UpdatedTest.txt' in page
href = tostring(page.pyquery('a.document-link')[0]).decode(
'utf-8')
href = client.extract_href(href)
resp = client.get(href)

assert not resp.status_code == 404
assert resp.status_code == 200

status_text_badge = page.pyquery('span.badge.rounded-pill')[0].text
assert status_text_badge == 'Updated'

0 comments on commit 77b13c5

Please sign in to comment.