Django 1.10: Fix dummy data for count stat.

Django 1.10 checks the foreign key constraints as part of the testing
suite so we need to create test data which passes validation tests.
This commit is contained in:
Umair Khan 2016-11-14 13:15:35 +05:00 committed by Tim Abbott
parent 47e8a56870
commit 7d51efe9a1
1 changed files with 1 additions and 1 deletions

View File

@ -128,7 +128,7 @@ class TestProcessCountStat(AnalyticsTestCase):
def make_dummy_count_stat(self, current_time):
# type: (datetime) -> CountStat
dummy_query = """INSERT INTO analytics_realmcount (realm_id, property, end_time, interval, value)
VALUES (222, 'test stat', '%(end_time)s','hour', 22)""" % {'end_time': current_time}
VALUES (1, 'test stat', '%(end_time)s','hour', 22)""" % {'end_time': current_time}
count_stat = CountStat('test stat', ZerverCountQuery(Recipient, UserCount, dummy_query),
{}, None, CountStat.HOUR, False)
return count_stat