summaryrefslogtreecommitdiff
path: root/tests/fixtures_model_package
diff options
context:
space:
mode:
authorAymeric Augustin <aymeric.augustin@m4x.org>2013-06-30 14:17:33 +0200
committerAymeric Augustin <aymeric.augustin@m4x.org>2013-06-30 14:17:33 +0200
commit2c406818058e88a907e24bfd244418d2a55619d7 (patch)
treeb1c4891dd9830d76bc492ff7258fb3a85e32c757 /tests/fixtures_model_package
parent5ff2ffa3304b2e49e17257575327f9fc08ce227e (diff)
Stopped calling loaddata with commit=False.
This was a stealth option only used by the tests, and it isn't useful any more since `atomic` provides nested transactions.
Diffstat (limited to 'tests/fixtures_model_package')
-rw-r--r--tests/fixtures_model_package/tests.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/fixtures_model_package/tests.py b/tests/fixtures_model_package/tests.py
index dbcc721d8f..4b00e6dfb9 100644
--- a/tests/fixtures_model_package/tests.py
+++ b/tests/fixtures_model_package/tests.py
@@ -60,7 +60,6 @@ class TestNoInitialDataLoading(TransactionTestCase):
'flush',
verbosity=0,
interactive=False,
- commit=False,
load_initial_data=False
)
self.assertQuerysetEqual(Book.objects.all(), [])
@@ -83,7 +82,7 @@ class FixtureTestCase(TestCase):
def test_loaddata(self):
"Fixtures can load data into models defined in packages"
# Load fixture 1. Single JSON file, with two objects
- management.call_command("loaddata", "fixture1.json", verbosity=0, commit=False)
+ management.call_command("loaddata", "fixture1.json", verbosity=0)
self.assertQuerysetEqual(
Article.objects.all(), [
"Time to reform copyright",
@@ -94,7 +93,7 @@ class FixtureTestCase(TestCase):
# Load fixture 2. JSON file imported by default. Overwrites some
# existing objects
- management.call_command("loaddata", "fixture2.json", verbosity=0, commit=False)
+ management.call_command("loaddata", "fixture2.json", verbosity=0)
self.assertQuerysetEqual(
Article.objects.all(), [
"Django conquers world!",
@@ -107,7 +106,7 @@ class FixtureTestCase(TestCase):
# Load a fixture that doesn't exist
with warnings.catch_warnings(record=True) as w:
warnings.simplefilter("always")
- management.call_command("loaddata", "unknown.json", verbosity=0, commit=False)
+ management.call_command("loaddata", "unknown.json", verbosity=0)
self.assertEqual(len(w), 1)
self.assertTrue(w[0].message, "No fixture named 'unknown' found.")