Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: [2/2] Tests For Access Control Capture #27142

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

surbhi-posthog
Copy link
Contributor

When the user sets the access control on a project level, we have logs that are captured here and we want tests to make sure that these logs are captured correctly. This PR covers the tests needed, however, there is a small issue with them failing remotely and I'm looking for feedback

Logs for test passing locally:


(env) surbhijhavar@Surbhis-MacBook-Pro posthog % pytest posthog/api/test/test_team.py -k test_access_control_toggle_capture -v   
/Users/surbhijhavar/posthog/env/lib/python3.11/site-packages/deepeval/__init__.py:53: UserWarning: You are using deepeval version 1.5.5, however version 2.0.9 is available. You should consider upgrading via the "pip install --upgrade deepeval" command.
  warnings.warn(
=================================================================== test session starts ===================================================================
platform darwin -- Python 3.11.10, pytest-8.0.2, pluggy-1.5.0 -- /Users/surbhijhavar/posthog/env/bin/python3.11
cachedir: .pytest_cache
django: settings: posthog.settings (from ini)
rootdir: /Users/surbhijhavar/posthog
configfile: pytest.ini
plugins: inline-snapshot-0.12.1, icdiff-0.6, repeat-0.9.3, flaky-3.7.0, cov-4.1.0, asyncio-0.21.1, mock-3.11.1, Faker-17.5.0, deepeval-1.5.5, split-0.9.0, django-4.5.2, env-0.8.2, anyio-4.6.2.post1, xdist-3.6.1, syrupy-4.6.4
asyncio: mode=Mode.STRICT
collected 70 items / 69 deselected / 1 selected                                                                                                           

posthog/api/test/test_team.py::TestTeamAPI::test_access_control_toggle_capture PASSED                                                               [100%]Running teardown with pytest sessionfinish...

===================================================================== inline snapshot =====================================================================

======================= 1 passed, 69 deselected in 3.78s =======================

@surbhi-posthog surbhi-posthog requested a review from a team December 23, 2024 20:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants