]> khamidou — GitHub mirrors - vcrpy.git/commitdiff
remove debugging code from Request and add repr
authorKevin McCarthy <me@kevinmccarthy.org>
Mon, 12 Aug 2013 03:07:13 +0000 (17:07 -1000)
committerKevin McCarthy <me@kevinmccarthy.org>
Mon, 12 Aug 2013 03:51:33 +0000 (17:51 -1000)
tests/integration/test_request.py
vcr/request.py

index 9fdc84a1cbede7c5f3e86c9d2a3af1303f021a7b..1875a4de99c7a21b76f177d64bcbc096e61b8fb4 100644 (file)
@@ -3,7 +3,10 @@ import vcr
 
 def test_recorded_request_url_with_redirected_request(tmpdir):
     with vcr.use_cassette(str(tmpdir.join('test.yml'))) as cass:
+        assert len(cass) == 0
         urllib2.urlopen('http://google.com')
+        print cass.requests
+        print cass.requests[0]
         assert cass.requests[0].url == 'http://google.com'
         assert cass.requests[1].url == 'http://www.google.com/'
         assert len(cass) == 2
index d91e29faa9580436082946d32744565159e78092..86e63e3b65465c1aef1b393532aebd39120e43df 100644 (file)
@@ -12,7 +12,6 @@ class Request(object):
 
     @property
     def url(self):
-        print self.protocol, self.host, self.path
         return "{0}://{1}{2}".format(self.protocol, self.host, self.path)
 
     def __key(self):
@@ -26,3 +25,6 @@ class Request(object):
 
     def __str__(self):
         return "<Request ({0}) {1}>".format(self.method, self.url)
+
+    def __repr__(self):
+        return self.__str__()