about summary refs log tree commit diff
path: root/pkgs/development/python-modules/bugzilla/checkPhase-fix-cookie-compare.patch
blob: 63c0fdc3c50212f9c916e49b06183c11bd230ba0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
From e7ed770363e8769727a915b2390c0ce1ab2ce964 Mon Sep 17 00:00:00 2001
From: Michal Hlavinka <mhlavink@redhat.com>
Date: Wed, 18 Jun 2014 20:07:24 -0400
Subject: tests: Fix cookie comparison on rawhide

Cookie comments changed, so just strip them out

(crobinso: Add commit message, make change more readable)

diff --git a/tests/misc.py b/tests/misc.py
index 4b4f99d..12da806 100644
--- a/tests/misc.py
+++ b/tests/misc.py
@@ -83,7 +83,12 @@ class MiscAPI(unittest.TestCase):
 
         # Mozilla should be converted inplace to LWP
         bugzilla.Bugzilla3(url=None, cookiefile=cookiesnew)
-        self.assertEquals(open(cookiesmoz).read(), open(cookiesnew).read())
+
+        def strip_comments(content):
+            return [l for l in content.split("\n") if not l.startswith("#")]
+        self.assertEquals(
+            strip_comments(open(cookiesmoz).read()),
+            strip_comments(open(cookiesnew).read()))
 
         # Make sure bad cookies raise an error
         try:
-- 
cgit v0.10.2