Skip to content

Commit 9a6b97e

Browse files
author
schen1870
committed
fix project details api test by providing product_subproduct config
1 parent b71a360 commit 9a6b97e

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

test/test_api/test_project_details_api.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,18 @@ def setUp(self):
3333
super(TestProjectAPI, self).setUp()
3434
db.session.query(Project).delete()
3535

36+
test_config = {
37+
'PRODUCTS_SUBPRODUCTS': {
38+
'test_product': ['test_subproduct1', 'test_subproduct2'],
39+
}
40+
}
41+
self.config_patcher = patch.dict(self.flask_app.config, test_config)
42+
self.config_patcher.start()
43+
44+
def tearDown(self):
45+
self.config_patcher.stop()
46+
super(TestProjectAPI, self).tearDown()
47+
3648
def setupProjects(self):
3749
project = ProjectFactory.create(
3850
updated='2015-01-01T14:37:30.642119',

0 commit comments

Comments
 (0)