Blame SOURCES/m2crypto-0.21.1-test_cookie_str_changed.patch

96ebcc
diff -ur M2Crypto/tests/test_authcookie.py M2Crypto-0.21.1/tests/test_authcookie.py
96ebcc
--- M2Crypto/tests/test_authcookie.py	2011-01-15 20:10:05.000000000 +0100
96ebcc
+++ M2Crypto-0.21.1/tests/test_authcookie.py	2015-07-07 14:42:20.713482088 +0200
96ebcc
@@ -114,7 +114,7 @@
96ebcc
     def test_cookie_str_changed_exp(self):
96ebcc
         c = self.jar.makeCookie(self.exp, self.data)
96ebcc
         cout = c.output()
96ebcc
-        str = cout[:26] + '2' + cout[27:]
96ebcc
+        str = cout[:26] + chr(ord(cout[26])^1) + cout[27:]
96ebcc
         s = Cookie.SmartCookie()
96ebcc
         s.load(str)
96ebcc
         self.failIf(self.jar.isGoodCookieString(s.output()))
96ebcc
@@ -122,7 +122,7 @@
96ebcc
     def test_cookie_str_changed_data(self):
96ebcc
         c = self.jar.makeCookie(self.exp, self.data)
96ebcc
         cout = c.output()
96ebcc
-        str = cout[:36] + 'X' + cout[37:]
96ebcc
+        str = cout[:36] + chr(ord(cout[36])^1) + cout[37:]
96ebcc
         s = Cookie.SmartCookie()
96ebcc
         s.load(str)
96ebcc
         self.failIf(self.jar.isGoodCookieString(s.output()))
96ebcc
@@ -130,7 +130,7 @@
96ebcc
     def test_cookie_str_changed_mac(self):
96ebcc
         c = self.jar.makeCookie(self.exp, self.data)
96ebcc
         cout = c.output()
96ebcc
-        str = cout[:76] + 'X' + cout[77:]
96ebcc
+        str = cout[:76] + chr(ord(cout[76])^1) + cout[77:]
96ebcc
         s = Cookie.SmartCookie()
96ebcc
         s.load(str)
96ebcc
         self.failIf(self.jar.isGoodCookieString(s.output()))