Created
October 3, 2012 23:16
-
-
Save jkeyes/3830501 to your computer and use it in GitHub Desktop.
Disabling and restoring Django transaction support in a TestCase
This file contains 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
# See https://gist.github.com/3830479 for disable_ and restore_ functions | |
from unittest import TestCase | |
class Test(TestCase): | |
@classmethod | |
def class_setup(cls): | |
disable_transaction_methods() | |
# ... import test fixtures | |
@classmethod | |
def class_teardown(cls): | |
restore_transaction_methods() | |
def test_data_attributes(self): | |
# ... | |
def test_class_properties(self): | |
# ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment