Changes between Initial Version and Version 1 of Ticket #23727, comment 2


Ignore:
Timestamp:
Jan 9, 2015, 2:35:20 AM (10 years ago)
Author:
khoobks

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #23727, comment 2

    initial v1  
    55{{{#!python
    66def _fixture_setup(self):
    7         super(MyTransactionTestCase, self)._fixture_setup()
    8         for app_config in apps.get_app_configs():
    9             update_contenttypes(app_config)
    10             create_permissions(app_config)
    11             create_default_site(app_config)
     7    super(MyTransactionTestCase, self)._fixture_setup()
     8    for app_config in apps.get_app_configs():
     9        update_contenttypes(app_config)
     10        create_permissions(app_config)
     11        create_default_site(app_config)
    1212
    13     def _fixture_teardown(self):
    14         signals.post_migrate.disconnect(create_default_site, sender=apps.get_app_config('sites'))
    15         signals.post_migrate.disconnect(update_contenttypes)
    16         signals.post_migrate.disconnect(create_permissions, dispatch_uid="django.contrib.auth.management.create_permissions")
    17         signals.post_migrate.disconnect(update_group_permissions)
     13def _fixture_teardown(self):
     14    signals.post_migrate.disconnect(create_default_site, sender=apps.get_app_config('sites'))
     15    signals.post_migrate.disconnect(update_contenttypes)
     16    signals.post_migrate.disconnect(create_permissions, dispatch_uid="django.contrib.auth.management.create_permissions")
     17    signals.post_migrate.disconnect(update_group_permissions)
    1818
    19         super(MyTransactionTestCase, self)._fixture_teardown()
     19    super(MyTransactionTestCase, self)._fixture_teardown()
    2020
    21         signals.post_migrate.connect(update_contenttypes)
    22         signals.post_migrate.connect(create_permissions, dispatch_uid="django.contrib.auth.management.create_permissions")
    23         signals.post_migrate.connect(create_default_site, sender=apps.get_app_config('sites'))
     21    signals.post_migrate.connect(update_contenttypes)
     22    signals.post_migrate.connect(create_permissions, dispatch_uid="django.contrib.auth.management.create_permissions")
     23    signals.post_migrate.connect(create_default_site, sender=apps.get_app_config('sites'))
    2424}}}
    2525
Back to Top