commit 9822ebba139e528b0ae12c3c0743acfd20ee4bc5 Author: Isis Lovecruft isis@torproject.org Date: Wed Dec 11 02:12:07 2013 +0000
Remove trailing '='s from unittests for networkstatus.parseRLine().
Because of the bug fixed in the last commit, two unittests in `test_parse_networkstatus.ParseNetworkStatusRLineTests` now FAIL. They are:
ø test_invalidDescriptorDigest_missingBase64padding ø test_invalidIPAddress --- lib/bridgedb/test/test_parse_networkstatus.py | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-)
diff --git a/lib/bridgedb/test/test_parse_networkstatus.py b/lib/bridgedb/test/test_parse_networkstatus.py index b34b5a5..b964b22 100644 --- a/lib/bridgedb/test/test_parse_networkstatus.py +++ b/lib/bridgedb/test/test_parse_networkstatus.py @@ -55,7 +55,7 @@ class ParseNetworkStatusRLineTests(unittest.TestCase): #: A base64-encoded SHA-1 digest of the OR [bridge-]server-descriptor #: document (the whole thing, up until the 'router signature' line, but not #: included the signature thereafter). - desc = 'Z6cisoPT9s6hEd4JkHFAlIWAwXQ=' + desc = 'Z6cisoPT9s6hEd4JkHFAlIWAwXQ' #: An ISO-8661 formatted timestamp, with a space separator (rather than a #: 'T' character). ts = '2013-10-31 15:15:15' @@ -181,10 +181,8 @@ class ParseNetworkStatusRLineTests(unittest.TestCase): the(nick).should.be.a(basestring) the(nick).should.be.equal(str(self.nick))
- b64ident = binascii.b2a_base64(ident).strip().rstrip('==') the(ident).should.be.a(basestring) - this(b64ident).should.be.a(basestring) - this(b64ident).should.be.equal(self.ident) + the(ident).should.be.equal(self.ident)
the(desc).should.be.equal(None) the(ts).should.be.equal(None) @@ -200,10 +198,8 @@ class ParseNetworkStatusRLineTests(unittest.TestCase): the(nick).should.be.a(basestring) the(nick).should.be.equal(str(self.nick))
- b64ident = binascii.b2a_base64(ident).strip().rstrip('==') the(ident).should.be.a(basestring) - this(b64ident).should.be.a(basestring) - this(b64ident).should.be.equal(self.ident) + the(ident).should.be.equal(self.ident)
the(desc).should.be.equal(None) the(ts).should.be.equal(None) @@ -246,15 +242,11 @@ class ParseNetworkStatusRLineTests(unittest.TestCase):
the(nick).should.be.equal(self.nick)
- b64ident = binascii.b2a_base64(ident).strip().strip('==') the(ident).should.be.a(basestring) - this(b64ident).should.be.a(basestring) - this(b64ident).should.be.equal(self.ident) + the(ident).should.be.equal(self.ident)
- b64desc = binascii.b2a_base64(desc).strip() the(desc).should.be.a(basestring) - this(b64desc).should.be.a(basestring) - this(b64desc).should.be.equal(self.desc) + the(b64desc).should.be.equal(self.desc)
the(ts).should.be.a(float) the(ip).should.be(None)
tor-commits@lists.torproject.org