⏱️ Duration: 2.63s
❌ Error:
fixturefunc = <function verify_filters_type_target at 0x7f17bf96f760>
request = <FixtureRequest for <Function test_testing_planner_target_filters_with_be_combined4>>
kwargs = {'post_targets': 'FACEBOOK_PAGE, INSTAGRAM, LINKEDIN, YOUTUBE_CHANNEL'}
def call_fixture_func(
fixturefunc: "_FixtureFunc[FixtureValue]", request: FixtureRequest, kwargs
) -> FixtureValue:
if is_generator(fixturefunc):
fixturefunc = cast(
Callable[..., Generator[FixtureValue, None, None]], fixturefunc
)
generator = fixturefunc(**kwargs)
try:
fixture_result = next(generator)
except StopIteration:
raise ValueError(f"{request.fixturename} did not yield a value") from None
finalizer = functools.partial(_teardown_yield_fixture, fixturefunc, generator)
request.addfinalizer(finalizer)
else:
fixturefunc = cast(Callable[..., FixtureValue], fixturefunc)
> fixture_result = fixturefunc(**kwargs)
venv/lib/python3.10/site-packages/_pytest/fixtures.py:917:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/test_filters.py:34: in verify_filters_type_target
posts = get_posts(fromDate="2028-04-01", toDate="2028-05-30", target=post_targets)
pages/filters.py:38: in get_posts
"Authorization": "Bearer " + authenticate()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
def authenticate():
"""
Returns authentication token
"""
login_endpoint = "/services/auth/v1/token"
payload = {
"email": filters_mail(),
"password": read_creds(password, 0).strip() # .strip() is required to remove empty spaces
}
# Make a POST request to the login endpoint
response = requests.post(base_url() + login_endpoint, json=payload)
# Assert that the status code is 200 and ret