diff --git a/test/test_query.py b/test/test_query.py index fb8d3ac16..3216c6f12 100644 --- a/test/test_query.py +++ b/test/test_query.py @@ -890,11 +890,11 @@ class NotQueryTest(DummyDataTestCase): self.assert_items_matched(not_results, [u'beets 4 eva']) self.assertNegationProperties(q) - @unittest.skip # skip until I can figure out what this test is doing def test_type_date(self): - q = dbcore.query.DateQuery(u'mtime', u'0.0') + q = dbcore.query.DateQuery(u'added', u'2000-01-01') not_results = self.lib.items(dbcore.query.NotQuery(q)) - self.assert_items_matched(not_results, []) + # query date is in the past, thus the 'not' results should contain all items + self.assert_items_matched(not_results, [u'foo bar', u'baz qux', u'beets 4 eva']) self.assertNegationProperties(q) def test_type_false(self): @@ -993,8 +993,7 @@ class NotQueryTest(DummyDataTestCase): AttributeError: type object 'NoneQuery' has no attribute 'field' at NoneQuery.match() (due to being @classmethod, and no self?) """ - classes = [#(dbcore.query.DateQuery, [u'mtime', u'0.0']), # skip until I can figure out what this test is doing - # replacing '0.0' with a proper date e.g. '2001-01-01' passes the test + classes = [(dbcore.query.DateQuery, [u'added', u'2001-01-01']), (dbcore.query.MatchQuery, [u'artist', u'one']), # (dbcore.query.NoneQuery, ['rg_track_gain']), (dbcore.query.NumericQuery, [u'year', u'2002']),