mirror of
https://github.com/pretix/pretix.git
synced 2026-01-25 00:42:26 +00:00
Try to fix postgres-only tests
This commit is contained in:
@@ -2856,9 +2856,9 @@ class OutgoingMailFilterForm(FilterForm):
|
||||
if fdata.get('query'):
|
||||
query = fdata.get('query')
|
||||
qs = qs.filter(
|
||||
Q(to__containsstring=query)
|
||||
| Q(cc__containsstring=query)
|
||||
| Q(bcc__containsstring=query)
|
||||
Q(to__containsstring=query.lower())
|
||||
| Q(cc__containsstring=query.lower())
|
||||
| Q(bcc__containsstring=query.lower())
|
||||
| Q(subject__icontains=query)
|
||||
)
|
||||
|
||||
|
||||
@@ -485,10 +485,10 @@ class OrganizerTest(SoupTest):
|
||||
assert b"rightrecipient@example.com" not in resp.content
|
||||
|
||||
if 'postgresql' in settings.DATABASES['default']['ENGINE']:
|
||||
resp = self.client.get('/control/organizer/%s/outgoingmails?query=rightrecipient' % self.orga1.slug)
|
||||
resp = self.client.get('/control/organizer/%s/outgoingmails?query=RIGHTrecipient@example.com' % self.orga1.slug)
|
||||
assert resp.status_code == 200
|
||||
assert b"rightrecipient@example.com" in resp.content
|
||||
resp = self.client.get('/control/organizer/%s/outgoingmails?query=wrongrecipient' % self.orga1.slug)
|
||||
resp = self.client.get('/control/organizer/%s/outgoingmails?query=wrongrecipient@example.com' % self.orga1.slug)
|
||||
assert resp.status_code == 200
|
||||
assert b"rightrecipient@example.com" not in resp.content
|
||||
|
||||
|
||||
Reference in New Issue
Block a user