Пример #1
0
def skipUnlessMutantModelDBFeature(feature, default=True):
    dbs = tuple(allow_migrate(MutableModel))

    def _dbs_dont_have_feature():
        return all(not getattr(connections[db].features, feature, default) for db in dbs)

    return _deferredSkip(_dbs_dont_have_feature, "Databases %s don't have feature %s" % (dbs, feature))
Пример #2
0
def skipIfMutantModelDBFeature(feature, default=False):
    dbs = tuple(allow_migrate(MutableModel))

    def _dbs_have_feature():
        return all(getattr(connections[db].features, feature, default) for db in dbs)

    return _deferredSkip(_dbs_have_feature, "Databases %s have feature %s" % (dbs, feature))
Пример #3
0
 def assertModelTablesColumnDoesntExists(self, model, column):
     table = model._meta.db_table
     for db in allow_migrate(model):
         self.assertColumnDoesntExists(db, table, column)
Пример #4
0
 def assertModelTablesDontExist(self, model):
     table = model._meta.db_table
     for db in allow_migrate(model):
         self.assertTableDoesntExists(db, table)
Пример #5
0
 def assertModelTablesColumnDoesntExists(self, model, column):
     table = model._meta.db_table
     for db in allow_migrate(model):
         self.assertColumnDoesntExists(db, table, column)
Пример #6
0
 def assertModelTablesDontExist(self, model):
     table = model._meta.db_table
     for db in allow_migrate(model):
         self.assertTableDoesntExists(db, table)