diff --git a/SAS/TMSS/test/t_tmss_test_database.py b/SAS/TMSS/test/t_tmss_test_database.py
index 418ad85448359e3b7791e7059cd2e0c83a73dfe3..3e99b742d72f12c0f4456f6191aff3f05b7153df 100755
--- a/SAS/TMSS/test/t_tmss_test_database.py
+++ b/SAS/TMSS/test/t_tmss_test_database.py
@@ -46,14 +46,15 @@ class TMSSPostgresTestMixinTestCase(TMSSPostgresTestMixin, unittest.TestCase):
     def test_db_basics(self):
         '''Can we do some simple plain sql queries?'''
         with PostgresDatabaseConnection(self.dbcreds) as db:
-            self.assertEqual(0, db.executeQuery("SELECT COUNT(*) FROM tmssapp_cycle;", fetch=FETCH_ONE)['count'])
+            cycle_count = db.executeQuery("SELECT COUNT(*) FROM tmssapp_cycle;", fetch=FETCH_ONE)['count']
+            self.assertGreaterEqual(cycle_count, 0)
 
             now = datetime.utcnow()
 
             db.executeQuery('''INSERT INTO tmssapp_cycle VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s);''',
                             qargs=([], now, now, "my_description", "my_name", now, now, 0, 1, 2, 3))
 
-            self.assertEqual(1, db.executeQuery("SELECT COUNT(*) FROM tmssapp_cycle;", fetch=FETCH_ONE)['count'])
+            self.assertEqual(cycle_count+1, db.executeQuery("SELECT COUNT(*) FROM tmssapp_cycle;", fetch=FETCH_ONE)['count'])
 
 
 if __name__ == "__main__":