This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def handle(self, *app_labels, **options): | |
# Generate a migrations manifest with latest migration on each app | |
super(Command, self).handle(*app_labels, **options) | |
loader = MigrationLoader(None, ignore_no_migrations=True) | |
apps = sorted(loader.migrated_apps) | |
graph = loader.graph | |
with open('latest_migrations.manifest', 'w') as f: | |
for app_name in apps: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Migration(migrations.Migration): | |
state_operations = [ORIGINAL_MIGRATIONS] | |
operations = migrations.SeparateDatabaseAndState(state_operations=state_operations) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pytest | |
class TestOne(object): | |
@pytest.fixture(autouse=True) | |
def setup(self): | |
5 / 0 | |
self.foo = 'foo' | |
def test_one(self): |