def test_sqlite_set(self): user = "******" persistence.postgres_set_sqlite(user, 1) date_one = persistence.postgres_lookup_sqlite_last_modified(user) persistence.postgres_set_sqlite(user, 2) date_two = persistence.postgres_lookup_sqlite_last_modified(user) version = persistence.postgres_lookup_sqlite_version(user) self.assertTrue(date_two > date_one) self.assertTrue(version == 2)
def perform_ota_restore(self, restore=None): self.clear_tables() if not restore: restore_xml = self.get_restore_xml() ParseUtils.parseXMLIntoSandbox(restore_xml, self.sandbox) else: restore_file = restore ParseUtils.parseFileIntoSandbox(File(restore_file), self.sandbox) persistence.postgres_set_sqlite(self.username, 1)