Hello Biola,
When you do a update in a queryset, the objects of the Session that already
instantiated need to be updated.
If you do in your test:
self.assertEqual(Session.objects.get(id=result.id).price, Decimal('700'))
The assertion will be ok
2014-11-10 8:21 GMT-02:00 Biola Oyeniyi :
> I have
I have atttempted updating a model based on using the update() method as
described in the
docs https://docs.djangoproject.com/en/dev/ref/models/querysets/ ,
I have used both sqlite and postgres but still end up with the model not
being updated.
My code is shown below.
def create_session
2 matches
Mail list logo