You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
New to using this project, thanks for creating and maintaining it!
While creating tests for myself, I find myself wanting to set the current user. I've finally had success using the internal _set_current_user() method. It would be great if there were an external facing testing toolset to make this easier/more accessible. Happy to make a go at it, if there's interest.
The text was updated successfully, but these errors were encountered:
+1 @ShmuelTreiger may i suggest a context manager if you decide to implement this, eg.
with current_user('foobar'):
objects.save()
we have noted that the client.login(user) in pytest 'works' however, so what you describe is only necessary for testing stuff outside of an api request.
New to using this project, thanks for creating and maintaining it!
While creating tests for myself, I find myself wanting to set the current user. I've finally had success using the internal
_set_current_user()
method. It would be great if there were an external facing testing toolset to make this easier/more accessible. Happy to make a go at it, if there's interest.The text was updated successfully, but these errors were encountered: