Skip to content

Commit

Permalink
[web][typing] fix table tests by using keyword-only arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasjuhrich committed Aug 24, 2023
1 parent 9d6e43b commit 6a5ae15
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions tests/table/test_bootstrap_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ def test_table_args_set(self, EmptyTable):
}

def test_table_args_after_instantiation(self, EmptyTable):
assert EmptyTable("#").table_args == {
assert EmptyTable(data_url="#").table_args == {
'data-toggle': "table",
"data-icons-prefix": "fa",
'data-url': "#",
Expand Down Expand Up @@ -250,10 +250,16 @@ class Meta:
return A_

def test_url_param_is_added(self, A: type[BootstrapTable]):
assert A("http://localhost/table").data_url == "http://localhost/table?inverted=yes"
assert (
A(data_url="http://localhost/table").data_url
== "http://localhost/table?inverted=yes"
)

def test_url_param_is_overridden(self, A: type[BootstrapTable]):
assert A("http://localhost/table?inverted=no").data_url == "http://localhost/table?inverted=yes"
assert (
A(data_url="http://localhost/table?inverted=no").data_url
== "http://localhost/table?inverted=yes"
)


class TestSplittedTable:
Expand Down

0 comments on commit 6a5ae15

Please sign in to comment.