1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-15 09:03:48 +00:00
nixpkgs/pkgs/development/python-modules/bugzilla/checkPhase-fix-cookie-compare.patch
2014-11-30 16:48:51 +01:00

31 lines
1,007 B
Diff

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