Commit 73b6f894 authored by Arkadiusz Hiler's avatar Arkadiusz Hiler

Test msg-id patch search

Looks like it was added untested.
Signed-off-by: default avatarArkadiusz Hiler <arkadiusz.hiler@intel.com>
parent cda07946
......@@ -46,3 +46,26 @@ class SeriesMsgIDLookup(Series0010):
msg_id = "toto@tata"
response = self.client.get(self.url.format(msg_id))
self.assertEqual(404, response.status_code)
class PatchMsgIDLookup(Series0010):
url = '/patch/msgid/{}/'
def patch(self):
return Patch.objects.first()
def testPatchMsgIdRedirects(self):
msg_id = self.patch().msgid
response = self.client.get(self.url.format(msg_id))
self.assertRedirects(response, self.patch().get_absolute_url())
def testNoAngleBracketsRedirects(self):
msg_id = self.patch().msgid
msg_id = msg_id.strip("<>")
response = self.client.get(self.url.format(msg_id))
self.assertRedirects(response, self.patch().get_absolute_url())
def testWrongMsgId404(self):
msg_id = "toto@tata"
response = self.client.get(self.url.format(msg_id))
self.assertEqual(404, response.status_code)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment