Skip to content

Commit

Permalink
bug757942 - more defensive integration test suite
Browse files Browse the repository at this point in the history
  • Loading branch information
peterbe authored and adngdb committed Jun 4, 2012
1 parent ca958e8 commit 3f757ef
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions socorro/unittest/cron/test_crontabber.py
Expand Up @@ -834,6 +834,13 @@ def setUp(self):
'user=%(database_user)s password=%(database_password)s' % DSN)
self.conn = psycopg2.connect(dsn)
cursor = self.conn.cursor()
# double-check there is a crontabber_state row
cursor.execute('select 1 from crontabber_state')
if not cursor.fetchone():
cursor.execute("""
insert into crontabber_state (state, last_updated)
values ('{}', now())
""")
cursor.execute("""
DROP TABLE IF EXISTS test_cron_victim;
CREATE TABLE test_cron_victim (
Expand Down

0 comments on commit 3f757ef

Please sign in to comment.