Esempio n. 1
0
  def test_init_on_fresh_db_creates_new_table(self):
    si = MigrationState()

    self.assert_equal(False, si.migration_table_present())

    si.init()

    self.assert_equal(True, si.migration_table_present())
Esempio n. 2
0
  def test_table_present_methods(self):
    si = MigrationState()

    self.assert_equal(False, si.migration_table_present())

    self.cursor.execute(create_new)

    self.assert_equal(True, si.migration_table_present())
Esempio n. 3
0
  def test_init_on_fresh_db_creates_new_table(self):
    si = MigrationState()

    self.assert_equal(False, si.migration_table_present())

    si.init()

    self.assert_equal(True, si.migration_table_present())
Esempio n. 4
0
  def test_table_present_methods(self):
    si = MigrationState()

    self.assert_equal(False, si.migration_table_present())

    self.cursor.execute(create_new)

    self.assert_equal(True, si.migration_table_present())
Esempio n. 5
0
  def test_init_on_initialized_db_does_nothing(self):
    self.cursor.execute(create_new)

    si = MigrationState()

    self.assert_equal(True, si.migration_table_present())

    si.init()

    self.assert_equal(True, si.migration_table_present())
Esempio n. 6
0
  def test_init_on_initialized_db_does_nothing(self):
    self.cursor.execute(create_new)

    si = MigrationState()

    self.assert_equal(True, si.migration_table_present())

    si.init()

    self.assert_equal(True, si.migration_table_present())