def test_get_result(setup_api): response = app.test_client().get("/users/1/snapshots/0/feelings") assert json.loads(response.data)['message'] == FEELINGS
def test_get_snapshot(setup_api): response = app.test_client().get("/users/1/snapshots/0") assert json.loads(response.data)['message'] == ['feelings']
def test_get_user(setup_api): response = app.test_client().get("/users/1") assert (json.loads(response.data)['message'] == USER)
def test_get_snapshots(setup_api): response = app.test_client().get("/users/1/snapshots") timestamp = json.loads(response.data)['message'][0]['datetime'] assert (date.fromtimestamp(int(timestamp)).isoformat() == NOW)
def test_get_users(setup_api): response = app.test_client().get("/users") assert (json.loads(response.data)['message'][0] == {'user_id': '1', 'username': '******'})