]> khamidou — GitHub mirrors - vcrpy.git/commitdiff
Added path to Request with matcher and test
authorMax Shytikov <mshytikov@gmail.com>
Sun, 6 Apr 2014 23:13:51 +0000 (01:13 +0200)
committerMax Shytikov <mshytikov@gmail.com>
Wed, 30 Apr 2014 00:27:52 +0000 (02:27 +0200)
tests/unit/test_matchers.py
vcr/request.py

index d6e412383edaf9e5df4d8ea9aa474e89e1a5719e..3e694568dbdd155f83d41f548fe065469f135e52 100644 (file)
@@ -39,4 +39,4 @@ def test_metchers():
     assert_matcher('method')
     assert_matcher('host')
     assert_matcher('port')
-    #assert_matcher('method')
+    assert_matcher('path')
index 8b45a47fa1d12b2df1965e59e9ab93221587c9e4..3cae1837ee51ae4a622638bf7b31e8ee82428dac 100644 (file)
@@ -23,6 +23,10 @@ class Request(object):
     def port(self):
         return urlparse(self.uri).port
 
+    @property
+    def path(self):
+        return urlparse(self.uri).path
+
     @property
     def url(self):
         return self.uri