-
Notifications
You must be signed in to change notification settings - Fork 429
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Amend tests for #316, and some double to single quote conversion
- Loading branch information
Showing
15 changed files
with
228 additions
and
190 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,16 +16,16 @@ def test_should_turn_email_address_into_hyperlink(): | |
class Table(tables.Table): | ||
email = tables.EmailColumn() | ||
|
||
table = Table([{"email": "[email protected]"}]) | ||
assert table.rows[0]["email"] == '<a href="mailto:[email protected]">[email protected]</a>' | ||
table = Table([{'email': '[email protected]'}]) | ||
assert table.rows[0].get_cell('email') == '<a href="mailto:[email protected]">[email protected]</a>' | ||
|
||
|
||
def test_should_render_default_for_blank(): | ||
class Table(tables.Table): | ||
email = tables.EmailColumn(default="---") | ||
email = tables.EmailColumn(default='---') | ||
|
||
table = Table([{"email": ""}]) | ||
assert table.rows[0]["email"] == '---' | ||
table = Table([{'email': ''}]) | ||
assert table.rows[0].get_cell('email') == '---' | ||
|
||
|
||
def test_should_be_used_for_datetimefields(): | ||
|
@@ -39,4 +39,4 @@ class Table(tables.Table): | |
class Meta: | ||
model = EmailModel | ||
|
||
assert type(Table.base_columns["field"]) == tables.EmailColumn | ||
assert type(Table.base_columns['field']) == tables.EmailColumn |
Oops, something went wrong.