@pytest.mark.django_dbdeftest_bearer_token_flow(sso_authenticated_client):# create new tokenresp=sso_authenticated_client.post(reverse("tokens"))assertresp.status_code==200token=resp.data["token"]prefix=resp.data["prefix"]# create new client using bearer token, verify we are authenticatedclient=APIClient()client.credentials(HTTP_AUTHORIZATION=f"Bearer {token}")resp=client.get(reverse("user"))assertresp.status_code==200assertresp.data["username"]=="fd_teppo3"# list tokensresp=sso_authenticated_client.get(f"{reverse('tokens')}")assertresp.status_code==200assertresp.data[0]["prefix"]==prefix# delete tokenresp=sso_authenticated_client.delete(f"{reverse('tokens')}?prefix={prefix}")assertresp.status_code==303# verify that token no longer worksresp=client.get(reverse("user"))assertresp.status_code==403