Skip to content

Commit

Permalink
Fix tests in py2.7
Browse files Browse the repository at this point in the history
  • Loading branch information
jameshageman-stripe committed Jan 29, 2019
1 parent 34cc6af commit aa0e7d6
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/test_integration.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
from __future__ import absolute_import, division, print_function

import sys
from threading import Thread
import json
import warnings
import time

import stripe
from stripe import six
import pytest

if sys.version_info[0] < 3:
Expand Down Expand Up @@ -141,16 +144,13 @@ def do_GET(self):
req_num = self.__class__.num_requests
if req_num == 1:
time.sleep(31 / 1000) # 31 ms
assert (
assert not self.headers.get(
"X-Stripe-Client-Telemetry"
not in self.headers.keys()
)
elif req_num == 2:
assert (
"X-Stripe-Client-Telemetry" in self.headers.keys()
)
assert self.headers.get("X-Stripe-Client-Telemetry")
telemetry = json.loads(
self.headers["X-Stripe-Client-Telemetry"]
self.headers.get("x-stripe-client-telemetry")
)
assert "last_request_metrics" in telemetry
req_id = telemetry["last_request_metrics"][
Expand Down

0 comments on commit aa0e7d6

Please sign in to comment.