Hi Sven,
You can mock the call to the external service like this.
@mock.patch.object(MyModelBackend, 'authenticate') # First the
class of your model backend. Then the method you want to mock.
def test_something_that_uses_login(self, mock_authenticate): # The
mock object is passed to your
Hi,
You should use User.objects.get(id=X)
Best
El 26/09/2014 15:28, "aRkadeFR" escribió:
>
> Hey!
>
> I'm having a hard time trying to reduce the number of SQL queries on a
view.
>
> Basically, I'm fetching all my User, with User.objects.all(), and save
this
> queryset as AllUser.
>
> Then every
ssage because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit
Hi Thomas,
El 29/09/2014 10:05, "Thomas Güttler" escribió:
>
> Hi,
>
> of course we separate data from code:
>
> - code belongs into version control (git)
> - data belongs into a database (postgres)
>
> But where does configuration belong?
"To the environment"
A good practice is to place conf
4 matches
Mail list logo