mirror of
https://github.com/kevin1024/vcrpy.git
synced 2025-12-09 01:03:24 +00:00
Added unit test for matcher 'method'
This commit is contained in:
13
tests/unit/test_matchers.py
Normal file
13
tests/unit/test_matchers.py
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
from vcr import matchers
|
||||||
|
from vcr import request
|
||||||
|
|
||||||
|
|
||||||
|
def test_method():
|
||||||
|
req_get = request.Request('http', 'google.com', 80, 'GET', '/', '', {})
|
||||||
|
assert True == matchers.method(req_get, req_get)
|
||||||
|
|
||||||
|
req_get1 = request.Request('https', 'httpbin.org', 80, 'GET', '/', '', {})
|
||||||
|
assert True == matchers.method(req_get, req_get1)
|
||||||
|
|
||||||
|
req_post = request.Request('http', 'google.com', 80, 'POST', '/', '', {})
|
||||||
|
assert False == matchers.method(req_get, req_post)
|
||||||
Reference in New Issue
Block a user