mirror of
https://github.com/beetbox/beets.git
synced 2025-12-06 08:39:17 +01:00
Fix some brittle query tests
These were written to incidentally depend on Nones; the behavior they're actually testing doesn't really have anything to say about None-ness.
This commit is contained in:
parent
b575a1ef75
commit
2a9be17cf6
2 changed files with 3 additions and 3 deletions
|
|
@ -320,7 +320,7 @@ class ModelTest(unittest.TestCase):
|
|||
def test_items(self):
|
||||
model = TestModel1(self.db)
|
||||
model.id = 5
|
||||
self.assertEqual({('id', 5), ('field_one', None)},
|
||||
self.assertEqual({('id', 5), ('field_one', 0)},
|
||||
set(model.items()))
|
||||
|
||||
def test_delete_internal_field(self):
|
||||
|
|
|
|||
|
|
@ -79,10 +79,10 @@ class AnyFieldQueryTest(_common.LibTestCase):
|
|||
|
||||
class AssertsMixin(object):
|
||||
def assert_items_matched(self, results, titles):
|
||||
self.assertEqual([i.title for i in results], titles)
|
||||
self.assertEqual(set([i.title for i in results]), set(titles))
|
||||
|
||||
def assert_albums_matched(self, results, albums):
|
||||
self.assertEqual([a.album for a in results], albums)
|
||||
self.assertEqual(set([a.album for a in results]), set(albums))
|
||||
|
||||
|
||||
# A test case class providing a library with some dummy data and some
|
||||
|
|
|
|||
Loading…
Reference in a new issue