Skip to content

Commit

Permalink
Fix pre-commit new line breaking a test
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisvanrun committed Dec 9, 2024
1 parent d0539ea commit 95b0308
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions app/tests/core_tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,25 +107,25 @@ def test_paginated_table_list_view_ordering():
assert view.default_sort_column == 0
assert view.default_sort_order == "desc"

assert "AaaaaA" == json_resp["data"][0][1]
assert "BbbbbB" in json_resp["data"][1][1]
assert "AaaaaA" == json_resp["data"][0][1].strip()
assert "BbbbbB" in json_resp["data"][1][1].strip()

# Swap direction
request.POST["order[0][dir]"] = "asc"
resp = view.post(request)
json_resp = json.loads(resp.content)
# Also swaped rows
assert "BbbbbB" == json_resp["data"][0][1]
assert "AaaaaA" == json_resp["data"][1][1]
assert "BbbbbB" == json_resp["data"][0][1].strip()
assert "AaaaaA" == json_resp["data"][1][1].strip()

# Change order column
request.POST["order[0][column]"] = "1"
resp = view.post(request)
json_resp = json.loads(resp.content)

# Also changes the rows
assert "AaaaaA" == json_resp["data"][0][1]
assert "BbbbbB" == json_resp["data"][1][1]
assert "AaaaaA" == json_resp["data"][0][1].strip()
assert "BbbbbB" == json_resp["data"][1][1].strip()


@pytest.mark.django_db
Expand Down

0 comments on commit 95b0308

Please sign in to comment.