From ff4c0abcf132ee21e76789613e4a4f5e98a063f5 Mon Sep 17 00:00:00 2001 From: discopatrick Date: Fri, 14 Apr 2017 13:04:45 +0100 Subject: [PATCH] =?UTF-8?q?tests=20=E2=80=98added=E2=80=99=20instead=20of?= =?UTF-8?q?=20=E2=80=98mtime=E2=80=99=20,=20and=20uses=20a=20correct=20dat?= =?UTF-8?q?e=20format?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/test_query.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) 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']),