summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJarek Glowacki <jarekwg@gmail.com>2016-03-10 14:09:44 +1100
committerMarkus Holtermann <info@markusholtermann.eu>2016-03-10 17:27:35 +1100
commit34c56687ae4df2cff632447eddd7ef255ee74726 (patch)
tree98f34de20a0e90ce6e44fc34e92fe1ee8495bd23 /tests
parentddf4af885fa3bc69e45781c10afa9e5ed3d90abc (diff)
Fixed #26342 -- Prevented unpacking when repr a NodeNotFoundError
Diffstat (limited to 'tests')
-rw-r--r--tests/migrations/test_exceptions.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/migrations/test_exceptions.py b/tests/migrations/test_exceptions.py
new file mode 100644
index 0000000000..3d839471f9
--- /dev/null
+++ b/tests/migrations/test_exceptions.py
@@ -0,0 +1,12 @@
+from django.db.migrations.exceptions import NodeNotFoundError
+from django.test import SimpleTestCase
+
+
+class ExceptionTests(SimpleTestCase):
+ def test_node_not_found_error_repr(self):
+ node = ('some_app_label', 'some_migration_label')
+ error_repr = repr(NodeNotFoundError('some message', node))
+ self.assertEqual(
+ error_repr,
+ "NodeNotFoundError(('some_app_label', 'some_migration_label'))"
+ )