Link to pages-per-row

Closes #1
This commit is contained in:
Simon Willison 2017-10-24 07:10:58 -07:00
commit b46e370ee6
3 changed files with 32 additions and 6 deletions

View file

@ -40,6 +40,7 @@ def test_pks_for_table(sql, table, expected_keys):
@pytest.mark.parametrize('row,pks,expected_path', [
({'A': 'foo', 'B': 'bar'}, ['A', 'B'], 'foo,bar'),
({'A': 'f,o', 'B': 'bar'}, ['A', 'B'], 'f%2Co,bar'),
({'A': 123}, ['A'], '123'),
])
def test_path_from_row_pks(row, pks, expected_path):
actual_path = app.path_from_row_pks(row, pks)