Esempio n. 1
0
    def setUp(self):
        place = Place()
        place.name = 'Sirvo Jantar'
        place.address = 'Endereço'
        place.neighborhood = 'Bairro'
        place.time = 'Seg. a Sexta: 19h às 2'
        place.phone = '(41) 5555-5555'
        place.city = City.objects.get(name='Curitiba')
        place.save()
        jantar = Meal.objects.get(name='Jantar')
        place.meal.add(jantar)
        place.save()
        self.place = place


        place2 = Place()
        place2.name = u'Sirvo Almoço'
        place2.address = 'Endereço'
        place2.neighborhood = 'Bairro'
        place2.time = 'Seg. a Sexta: 19h às 2'
        place2.phone = '(41) 5555-5555'
        place2.city = City.objects.get(name='São Paulo')
        place2.save()
        almoco = Meal.objects.get(name='Almoço')
        place2.meal.add(almoco)
        place2.save()
        self.place2 = place2
Esempio n. 2
0
 def setUp(self):
     place = Place()
     place.name = 'Nome'
     place.address = 'Endereço'
     place.neighborhood = 'Bairro'
     place.time = 'Seg. a Sexta: 19h às 2'
     place.phone = '(41) 5555-5555'
     place.city = City.objects.get(name='Curitiba')
     place.save()
     self.place = place