Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix tests (mitmproxy error) #202

Merged
merged 3 commits into from
Jan 31, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ install:
- phpenv local --unset

# Setup the proxy
- pip install --user mitmproxy
- pip install --user mitmproxy~=0.15

before_script:
- PHPBIN=$TESTPHPBIN PORT=8080 vendor/bin/start.sh
Expand Down
4 changes: 2 additions & 2 deletions tests/Transport/Base.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ public function testHEAD() {
}

public function testTRACE() {
$request = Requests::trace(httpbin('/get'), array(), $this->getOptions());
$request = Requests::trace(httpbin('/trace'), array(), $this->getOptions());
$this->assertEquals(200, $request->status_code);
}

Expand Down Expand Up @@ -242,7 +242,7 @@ public function testPATCHWithArray() {
}

public function testOPTIONS() {
$request = Requests::options(httpbin('/post'), array(), array(), $this->getOptions());
$request = Requests::options(httpbin('/options'), array(), array(), $this->getOptions());
$this->assertEquals(200, $request->status_code);
}

Expand Down
4 changes: 2 additions & 2 deletions tests/utils/proxy/proxy.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
def request(context, flow):
flow.request.headers["x-requests-proxy"] = ["http"]
flow.request.headers["x-requests-proxy"] = "http"

def response(context, flow):
flow.response.headers["x-requests-proxied"] = ["http"]
flow.response.headers[b"x-requests-proxied"] = "http"