Example #1
0
 def test_observation_dates(self):
     observation = SolarSystemObjectObservationFactory.create(
         date=datetime.date.today() - datetime.timedelta(days=1),
         user_profile=self.user.userprofile
     )
     start_time = datetime.date.today() - datetime.timedelta(days=2),
     end_time = datetime.date.today()
     response = self.client.get(
         "{0}?start_time={1}&end_time={2}".format(
             reverse('profile', args=(self.user.username,)),
             start_time,
             end_time
         )
     )
     print response
     self.assertContains(response, observation.description)
Example #2
0
 def setUp(self):
     self.user = UserFactory.create()
     self.observation = SolarSystemObjectObservationFactory.create()