Example #1
0
 def test_models_tz_value_lookup(self):
     test_models.Profile(name="Brian Rosner",
                         timezone="America/Denver").save()
     qs = test_models.Profile.objects.filter(
         timezone=pytz.timezone("America/Denver"))
     self.assertEqual(qs.count(), 1)
Example #2
0
 def test_models_tz_value(self):
     tz = pytz.timezone("America/Denver")
     p = test_models.Profile(name="Brian Rosner", timezone=tz)
     p.save()
     p = test_models.Profile.objects.get(pk=p.pk)
     self.assertEqual(p.timezone, tz)