Re: Django test client encoding of JSON Booleans

2014-02-24 Thread Daniel Smith
ay, February 22, 2014 10:56:21 AM UTC-5, Camilo Torres wrote: > > On Friday, February 21, 2014 6:14:14 PM UTC-4:30, Daniel Smith wrote: >> >> I'm using Django version 1.5.5. Here is a short snippet of the test I'm >> writing: >> >> from django.test impo

Django test client encoding of JSON Booleans

2014-02-21 Thread Daniel Smith
I'm using Django version 1.5.5. Here is a short snippet of the test I'm writing: from django.test import TestCase class MyTest(TestCase): def my_test(self): url = ... location of my view ... self.client.post(url, data={'active': False}, format='json') The problem I'm running into is

override_settings decoration of non-test class function

2013-11-17 Thread Daniel Smith
I recently ran into a bug in our test code due to override settings resetting the settings to default after the function returned. Obviously, we shouldn't be using the override_settings decorator on a random function, but I think there is still room for improvement. At minimum, I think it would