Closed
Bug 793992
Opened 12 years ago
Closed 12 years ago
Error in test fixture
Categories
(Marketplace Graveyard :: General, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
2012-09-27
People
(Reporter: tarek, Assigned: tarek)
References
Details
Problem installing fixture 'base/appversion.json.bz2': Traceback (most recent call last):
File "/home/marketplace/.virtualenvs/marketplace/local/lib/python2.7/site-packages/django/core/management/commands/loaddata.py", line 226, in handle
connection.check_constraints(table_names=table_names)
File "/home/marketplace/.virtualenvs/marketplace/local/lib/python2.7/site-packages/django/db/backends/mysql/base.py", line 474, in check_constraints
referenced_table_name, referenced_column_name))
IntegrityError: The row in table 'appversions' with primary key '402' has an invalid foreign key: appversions.application_id contains a value '2' that does not have a corresponding value in applications.id.
Assignee | ||
Comment 1•12 years ago
|
||
Found the issue, here's the fix
Wil, r?
diff --git a/mkt/api/tests/test_handlers.py b/mkt/api/tests/test_handlers.py
index 4aee873..11a625e 100644
--- a/mkt/api/tests/test_handlers.py
+++ b/mkt/api/tests/test_handlers.py
@@ -162,7 +162,7 @@ def _mock_fetch_content(url):
class TestAppCreateHandler(CreateHandler, AMOPaths):
fixtures = ['base/user_2519', 'base/users',
- 'base/platforms', 'base/appversion']
+ 'base/platforms', 'base/apps', 'base/appversion']
def count(self):
return Addon.objects.count()
Assignee | ||
Updated•12 years ago
|
Assignee: nobody → tarek
Comment 2•12 years ago
|
||
r+
For history... Django < 1.4 used to import those fine but 1.4+ has become a lot more strict. We've fixed all the ones that actually cause test failures, but there has been a few stragglers that don't seem to affect the tests. I try to fix a few here and there when I notice while running the test suite.
Assignee | ||
Comment 3•12 years ago
|
||
oh I see.. thx for the explanation
pushed in https://github.com/mozilla/zamboni/commit/0970ab8a5165ed669278a9de5cdb39e19952faa4
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•