Trace logging
Build and Release / run-terraform (push) Successful in 42s
Details
Build and Release / run-terraform (push) Successful in 42s
Details
This commit is contained in:
parent
4e3894198d
commit
29412eb383
|
@ -9,7 +9,7 @@ class Timelines():
|
|||
self.config = configuration
|
||||
self.auth = authorization
|
||||
|
||||
def home_timeline(self, min_id=None, max_id=None, since_id=None, limit=None):
|
||||
def home(self, min_id=None, max_id=None, since_id=None, limit=None):
|
||||
url = "https://"+self.config.get_value("server")+"/api/v1/timelines/home"
|
||||
|
||||
parameters = dict()
|
||||
|
@ -23,5 +23,5 @@ class Timelines():
|
|||
parameters["limit"] = limit
|
||||
|
||||
response = requests.get(url, headers=self.auth.get_auth_headers(), params=parameters)
|
||||
logger.debug("JSON: {}".format(response.raw))
|
||||
logger.trace("JSON: {}".format(str(response.content)))
|
||||
return response.json()
|
||||
|
|
|
@ -15,7 +15,7 @@ def app():
|
|||
@responses.activate
|
||||
def test_home_timeline(app):
|
||||
responses.get("https://social.example.com/api/v1/timelines/home", json=json_reader("./tests/resources/timeline_home_response.json"))
|
||||
response = app.timelines.home_timeline()
|
||||
response = app.timelines.home()
|
||||
assert response is not None
|
||||
statuses = []
|
||||
for status in response:
|
||||
|
@ -31,7 +31,7 @@ def test_home_timeline_max_id(app):
|
|||
responses.get("https://social.example.com/api/v1/timelines/home",
|
||||
json=json_reader("./tests/resources/timeline_home_response.json"),
|
||||
match=[matchers.query_param_matcher(params)])
|
||||
response = app.timelines.home_timeline(max_id="1")
|
||||
response = app.timelines.home(max_id="1")
|
||||
assert response is not None
|
||||
statuses = []
|
||||
for status in response:
|
||||
|
@ -47,7 +47,7 @@ def test_home_timeline_min_id(app):
|
|||
responses.get("https://social.example.com/api/v1/timelines/home",
|
||||
json=json_reader("./tests/resources/timeline_home_response.json"),
|
||||
match=[matchers.query_param_matcher(params)])
|
||||
response = app.timelines.home_timeline(min_id="1")
|
||||
response = app.timelines.home(min_id="1")
|
||||
assert response is not None
|
||||
statuses = []
|
||||
for status in response:
|
||||
|
@ -63,7 +63,7 @@ def test_home_timeline_since_id(app):
|
|||
responses.get("https://social.example.com/api/v1/timelines/home",
|
||||
json=json_reader("./tests/resources/timeline_home_response.json"),
|
||||
match=[matchers.query_param_matcher(params)])
|
||||
response = app.timelines.home_timeline(since_id="1")
|
||||
response = app.timelines.home(since_id="1")
|
||||
assert response is not None
|
||||
statuses = []
|
||||
for status in response:
|
||||
|
@ -79,7 +79,7 @@ def test_home_timeline_limt(app):
|
|||
responses.get("https://social.example.com/api/v1/timelines/home",
|
||||
json=json_reader("./tests/resources/timeline_home_response.json"),
|
||||
match=[matchers.query_param_matcher(params)])
|
||||
response = app.timelines.home_timeline(limit="1")
|
||||
response = app.timelines.home(limit="1")
|
||||
assert response is not None
|
||||
statuses = []
|
||||
for status in response:
|
||||
|
@ -93,5 +93,3 @@ def test_home_timeline_limt(app):
|
|||
def json_reader(path):
|
||||
with open(path) as f:
|
||||
return json.load(f)
|
||||
|
||||
#match=[matchers.query_param_matcher(params)],
|
||||
|
|
Loading…
Reference in New Issue