summaryrefslogtreecommitdiff
path: root/patchwork/tests
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2020-04-16 09:29:26 +0800
committerStephen Finucane <stephen@that.guru>2020-04-18 12:30:35 +0100
commit947c6aae94b7b554ca701c1d7e5baf000759ed2d (patch)
treea2aa87bfb40fb71221a9aa1fc74c6a7d88fd0974 /patchwork/tests
parenta60e75e2c6897fd262ec95a35e0e94b9027c11d4 (diff)
downloadpatchwork-947c6aae94b7b554ca701c1d7e5baf000759ed2d.tar
patchwork-947c6aae94b7b554ca701c1d7e5baf000759ed2d.tar.gz
parser: prevent IntegrityErrors
Currently, the parser relies on causing (and catching) IntegrityErrors on patch insert to catch duplicate (msgid,project) mails. This change performs an atomic select -> insert instead. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Stephen Finucane <stephen@that.guru> [stephenfin: Remove 'expectedFailure' marker again]
Diffstat (limited to 'patchwork/tests')
-rw-r--r--patchwork/tests/test_parser.py1
1 files changed, 0 insertions, 1 deletions
diff --git a/patchwork/tests/test_parser.py b/patchwork/tests/test_parser.py
index 0122fb8..b640a3a 100644
--- a/patchwork/tests/test_parser.py
+++ b/patchwork/tests/test_parser.py
@@ -1138,7 +1138,6 @@ class DuplicateMailTest(TestCase):
self.assertEqual(errors, [])
- @unittest.expectedFailure
def test_duplicate_patch(self):
diff = read_patch('0001-add-line.patch')
m = create_email(diff, listid=self.listid, msgid='1@example.com')