Merge lp:~facundo/ubuntu-rest-scopes/amazon-always-root into lp:ubuntu-rest-scopes

Proposed by Facundo Batista
Status: Merged
Approved by: Facundo Batista
Approved revision: 488
Merged at revision: 489
Proposed branch: lp:~facundo/ubuntu-rest-scopes/amazon-always-root
Merge into: lp:ubuntu-rest-scopes
Diff against target: 33 lines (+12/-0)
2 files modified
configs/scopes/amazon_subtitles.yaml (+5/-0)
src/scopes/tests/test_amazon.py (+7/-0)
To merge this branch: bzr merge lp:~facundo/ubuntu-rest-scopes/amazon-always-root
Reviewer Review Type Date Requested Status
Bret Barker (community) Approve
Review via email: mp+274900@code.launchpad.net

Commit message

Assure all category roots have subtitles for Amazon.

Description of the change

Assure all category roots have subtitles for Amazon.

To post a comment you must log in.
Revision history for this message
Bret Barker (noise) wrote :

LGTM

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'configs/scopes/amazon_subtitles.yaml'
2--- configs/scopes/amazon_subtitles.yaml 2014-06-17 15:31:56 +0000
3+++ configs/scopes/amazon_subtitles.yaml 2015-10-19 14:50:33 +0000
4@@ -133,6 +133,11 @@
5 - x:Manufacturer
6 - x:Binding
7
8+Luggage & Bags:
9+- x:Brand
10+- x:Manufacturer
11+- x:Binding
12+
13 Magazines:
14 - x:Publisher
15 - x:Manufacturer
16
17=== modified file 'src/scopes/tests/test_amazon.py'
18--- src/scopes/tests/test_amazon.py 2015-10-05 13:39:17 +0000
19+++ src/scopes/tests/test_amazon.py 2015-10-19 14:50:33 +0000
20@@ -411,6 +411,13 @@
21 missing = root_cats - set(app.sorting_info[shop])
22 self.assertFalse(missing, "Missing in %r: %s" % (shop, missing))
23
24+ def test_all_roots_have_subtitles(self):
25+ app = amazon.App(CONFIG)
26+ for shop, shop_data in app.departments_map.items():
27+ root_cats = set(x[0] for x in shop_data.values())
28+ missing = root_cats - set(app.subtitle_attribs)
29+ self.assertFalse(missing, "Missing in %r: %s" % (shop, missing))
30+
31
32 class HelpersTestCase(TestCase):
33 """Test some helping functions."""

Subscribers

People subscribed via source and target branches