aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Finucane <stephen@that.guru>2019-12-01 15:05:06 +0000
committerStephen Finucane <stephen@that.guru>2019-12-27 13:04:46 +0000
commit757b33fa606aa7fcf3d2aafc1a6c2297fe3c9e3d (patch)
tree34cdae2b829f764c5e58940fb4ed862ce56c164d
parent1bb0b97265043617eda2eef13dc9e70407925b1e (diff)
downloadpatchwork-757b33fa606aa7fcf3d2aafc1a6c2297fe3c9e3d.tar
patchwork-757b33fa606aa7fcf3d2aafc1a6c2297fe3c9e3d.tar.gz
tests: Skip tests that fail on SQLite DB backend
These are failing due to differences in behavior of the backend. Since this will never be used for production, we can simply skip these unit tests and rely on the CI to catch potential issues. Signed-off-by: Stephen Finucane <stephen@that.guru>
-rw-r--r--patchwork/tests/test_list.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/patchwork/tests/test_list.py b/patchwork/tests/test_list.py
index 1c0503f..c6ccd0d 100644
--- a/patchwork/tests/test_list.py
+++ b/patchwork/tests/test_list.py
@@ -4,8 +4,10 @@
# SPDX-License-Identifier: GPL-2.0-or-later
from datetime import datetime as dt
+import unittest
import re
+from django.conf import settings
from django.test import TestCase
from django.urls import reverse
from django.utils.six.moves import zip
@@ -95,6 +97,14 @@ class PatchOrderTest(TestCase):
self._test_sequence(response, test_fn)
+ # TODO(stephenfin): Looks like this has been resolved in Django 2.1 [1]? If
+ # not, it should be possible [2]
+ #
+ # [1] https://code.djangoproject.com/ticket/30248
+ # [2] https://michaelsoolee.com/case-insensitive-sorting-sqlite/
+ @unittest.skipIf('sqlite3' in settings.DATABASES['default']['ENGINE'],
+ 'The sqlite3 backend does not support case insensitive '
+ 'ordering')
def test_submitter_order(self):
url = reverse('patch-list',
kwargs={'project_id': self.project.linkname})
@@ -106,6 +116,9 @@ class PatchOrderTest(TestCase):
self._test_sequence(response, test_fn)
+ @unittest.skipIf('sqlite3' in settings.DATABASES['default']['ENGINE'],
+ 'The sqlite3 backend does not support case insensitive '
+ 'ordering')
def test_submitter_reverse_order(self):
url = reverse('patch-list',
kwargs={'project_id': self.project.linkname})