Beispiel #1
0
    def setUp(self):
        self.beer1 = BeerFactory.create()
        self.beer2 = BeerFactory.create()
        self.user = get_user_model().objects.create_user('*****@*****.**', 'password')

        self.venue = VenueFactory()
        self.beer1_sighting1 = SightingFactory(beer=self.beer1, venue=self.venue)
        self.beer2_sighting1 = SightingFactory(beer=self.beer2, venue=self.venue, date_sighted=timezone.now() - timedelta(minutes=1))
        self.beer1_sighting2 = SightingFactory(beer=self.beer1, venue=VenueFactory.create(point = fromstr("POINT(77.29 37.33)")
), date_sighted=timezone.now() - timedelta(minutes=2))
        self.beer2_sighting2 = SightingFactory(beer=self.beer2, venue=VenueFactory.create(point=fromstr("Point(-77.4419362313172 37.5254898040785)")), user=UserFactory(show_name_on_sightings=False), date_sighted=timezone.now() - timedelta(minutes=3))
Beispiel #2
0
    def setUp(self):
        self.beer = BeerFactory.create()
        self.user = get_user_model().objects.create_user('*****@*****.**', 'password')
        self.user2 = get_user_model().objects.create_user('*****@*****.**', 'password')

        self.venue = VenueFactory()
        self.sighting1 = SightingFactory(beer=self.beer, venue=self.venue, user=self.user)
        self.sighting2 = SightingFactory(beer=self.beer,
                                         venue=VenueFactory.create(point=fromstr("POINT(77.29 37.33)")),
                                         date_sighted=timezone.now() - timedelta(minutes=2))