Skip to content

Commit

Permalink
Improved tests for total ordering of MimeType.
Browse files Browse the repository at this point in the history
  • Loading branch information
eseifert committed Jun 21, 2018
1 parent 6a34ac0 commit 6fd97c9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/test_mime.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,13 +160,17 @@ def test_mime_type_has_a_total_ordering():
mime2 = MimeType(mediatype='foo', subtype='baz')
assert mime1 < mime2
assert mime2 > mime1
assert not (mime1 < mime1)

mime3 = MimeType(mediatype='foo', subtype=None)
assert mime3 < mime1

mime4 = MimeType(mediatype=None, subtype='bar')
assert mime4 < mime2

mime5 = MimeType(mediatype='goo', subtype='bar')
assert mime1 < mime5


def test_mime_type_has_ordering_compared_to_strings():
mime = MimeType(mediatype='foo', subtype='bar')
Expand Down

0 comments on commit 6fd97c9

Please sign in to comment.