Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Daklapack Article Code Updates #488

Merged
merged 2 commits into from
Nov 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions microsetta_private_api/admin/tests/test_admin_repo.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@

STANDARD_ACCT_ID = "12345678-bbbb-cccc-dddd-eeeeffffffff"
ADMIN_ACCT_ID = "12345678-1234-1234-1234-123412341234"
FIRST_LIVE_DAK_ARTICLE = {'dak_article_code': '3510000E',
'short_description': 'TMI 1 tube',
FIRST_LIVE_DAK_ARTICLE = {'dak_article_code': '3510005E',
'short_description': 'TMI 1matrix tube',
'detailed_description':
'TMI 1 tube, American English'
'TMI 1 matrix tube, American English'
}
# This is the first one in the db, but it is retired
FIRST_DAK_ARTICLE = {'dak_article_code': '350103',
Expand Down Expand Up @@ -994,7 +994,7 @@ def test_get_daklapack_articles_not_retired(self):
with Transaction() as t:
admin_repo = AdminRepo(t)
articles = admin_repo.get_daklapack_articles()
self.assertEqual(11, len(articles))
self.assertEqual(8, len(articles))
first_article = articles[0]
first_article.pop("dak_article_id")
self.assertEqual(FIRST_LIVE_DAK_ARTICLE, first_article)
Expand All @@ -1003,7 +1003,7 @@ def test_get_daklapack_articles_all(self):
with Transaction() as t:
admin_repo = AdminRepo(t)
articles = admin_repo.get_daklapack_articles(include_retired=True)
self.assertEqual(19, len(articles))
self.assertEqual(24, len(articles))
first_article = articles[0]
first_article.pop("dak_article_id")
self.assertEqual(FIRST_DAK_ARTICLE, first_article)
Expand Down
9 changes: 9 additions & 0 deletions microsetta_private_api/db/patches/0105.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
-- Add new article codes for matrix tube kits
INSERT INTO barcodes.daklapack_article (dak_article_code, short_description, detailed_description) VALUES ('3510005E', 'TMI 1matrix tube', 'TMI 1 matrix tube, American English');
INSERT INTO barcodes.daklapack_article (dak_article_code, short_description, detailed_description) VALUES ('3510006E', 'TMI 1matrix tube', 'TMI 1 matrix tube, American English, no inbound label');
INSERT INTO barcodes.daklapack_article (dak_article_code, short_description, detailed_description) VALUES ('3510006M', 'TMI 1matrix tube', 'TMI 1 matrix tube, Mexican Spanish, no inbound label');
INSERT INTO barcodes.daklapack_article (dak_article_code, short_description, detailed_description) VALUES ('3510006S', 'TMI 1matrix tube', 'TMI 1 matrix tube, Spanish, no inbound label');
INSERT INTO barcodes.daklapack_article (dak_article_code, short_description, detailed_description) VALUES ('3510006J', 'TMI 1matrix tube', 'TMI 1 matrix tube, Japanese, no inbound label');

-- Retire old kit configurations that we won't be using in the future
UPDATE barcodes.daklapack_article SET retired = true WHERE dak_article_code IN ('3510000E', '3510001E', '3511000E', '3541002E', '3510001M', '3510001S', '3510001J', '3521003E');