Skip to content

Commit 17838bc

Browse files
committed
Add tests for new queries
1 parent a77b42a commit 17838bc

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

test/test_query.py

+20
Original file line numberDiff line numberDiff line change
@@ -1152,6 +1152,26 @@ def test_get_albums_filter_by_album_flex(self):
11521152
results = self.lib.albums(q)
11531153
self.assert_albums_matched(results, ["Album1"])
11541154

1155+
def test_get_albums_filter_by_track_flex(self):
1156+
q = "item_flex1:Album1"
1157+
results = self.lib.albums(q)
1158+
self.assert_albums_matched(results, ["Album1"])
1159+
1160+
def test_get_items_filter_by_album_flex(self):
1161+
q = "album_flex:Album1"
1162+
results = self.lib.items(q)
1163+
self.assert_items_matched(results, ["Album1 Item1", "Album1 Item2"])
1164+
1165+
def test_filter_by_flex(self):
1166+
q = "item_flex1:'Item1 Flex1'"
1167+
results = self.lib.items(q)
1168+
self.assert_items_matched(results, ["Album1 Item1", "Album2 Item1"])
1169+
1170+
def test_filter_by_many_flex(self):
1171+
q = "item_flex1:'Item1 Flex1' item_flex2:Album1"
1172+
results = self.lib.items(q)
1173+
self.assert_items_matched(results, ["Album1 Item1"])
1174+
11551175

11561176
def suite():
11571177
return unittest.TestLoader().loadTestsFromName(__name__)

0 commit comments

Comments
 (0)