def setUp(self): self.place = Place(label='testing place', visible=True) place_type = PlaceType(description='a place type') place_type.save() self.place.place_type = place_type phone_type = PhoneType(description='phone type test') phone = Phone(area='23', phoneNumber='45679078', ext='4444', phoneType=phone_type) phone.content_object = self.place addressType = AddressType(description='Home') addressType.save() address = Address() address.addressPrefix = 'Rua' address.addressLine1 = 'Rui Barbosa, 1234' address.addressLine2 = 'Anexo II - Sala 4' address.neighborhood = 'Centro' address.zipCode = '12345-123' address.addressType = AddressType.objects.get(pk=1) country = Country(name='test', nationality='testing') country.save() state = State(name='test', shortName='t', country=country) state.save() city = City(name='test', state=state) city.save() address.city = city address.content_object = self.place self.place.save()
def setUp(self): self.schedule = ScheduleOccurrence() self.schedule.reserve = True self.schedule.annotation = "this is schedule test" self.schedule.start_time = datetime.now() self.schedule.end_time = datetime.now() self.place = Place(label='testing place') place_type = PlaceType(description='a place type') place_type.save() self.place.place_type = place_type phone_type = PhoneType(description='phone type test') self.phone = Phone(area='23', phoneNumber='45679078', ext='4444', phoneType=phone_type) self.phone.content_object = self.place addressType = AddressType(description='Home') addressType.save() address = Address() address.addressPrefix = 'Rua' address.addressLine1 = 'Rui Barbosa, 1234' address.addressLine2 = 'Anexo II - Sala 4' address.neighborhood = 'Centro' address.zipCode = '12345-123' address.addressType = AddressType.objects.get(pk=1) country = Country(name='test', nationality='testing') country.save() state = State(name='test', shortName='t', country=country) state.save() city = City(name='test', state=state) city.save() address.city = city address.content_object = self.place self.place.save() self.room = Room() self.room.place = self.place room_type = RoomType() self.room.room_type = room_type self.room.furniture = "tree table" self.schedule.room = self.room
def setUp(self): self.place = Place(label='testing place') if len(PlaceType.objects.all())==0: place_type = PlaceType(description='Matriz') place_type.save() document = TypeDocument(description='CPF') document.save() a = AddressType(description='Comercial') a.save() room_type = RoomType() room_type.description = 'sala test' room_type.save() plan = Plan() plan.name = 'Teste 1' plan.value = 324.00 plan.duration = 1 plan.staff_size = 1 plan.save() p = PaymentType() p.id = 1 p.name = 'Teste 1' p.save() p = PaymentType() p.id = 4 p.name = 'Teste 4' p.save() country = Country(name='test', nationality='testing') country.save() state = State(name='test', shortName='t', country=country) state.save() city = City(name='test', state=state) city.save() else: place_type = PlaceType.objects.get(description='Matriz') self.place.place_type = place_type phone_type = PhoneType(description='phone type test') phone_type.save() self.phone = Phone(area='23', phoneNumber='45679078', ext='4444', phoneType=phone_type) self.phone.content_object = self.place addressType = AddressType(description='Home') addressType.save() address = Address() address.addressPrefix = 'Rua' address.addressLine1 = 'Rui Barbosa, 1234' address.addressLine2 = 'Anexo II - Sala 4' address.neighborhood = 'Centro' address.zipCode = '12345-123' address.addressType = AddressType.objects.get(pk=1) country = Country(name='test', nationality='testing') country.save() state = State(name='test', shortName='t', country=country) state.save() city = City(name='test', state=state) city.save() address.city = city address.content_object = self.place self.place.save()
def setup_required_data(): country = Country(name='test', nationality='testing') country.save() place = Place(label='testing place') state = State(name='test', shortName='t', country=country) state.save() city = City(name='test', state=state) city.save() if len(PlaceType.objects.all()) == 0: placeType = PlaceType(description='Matriz') placeType.save() document = TypeDocument(description='CPF') document.save() a = AddressType(description='Comercial') a.save() room_type = RoomType() room_type.description = 'sala test' room_type.save() plan = Plan() plan.name = 'Teste 1' plan.value = 324.00 plan.duration = 1 plan.staff_size = 1 plan.save() p = PaymentType() p.id = 1 p.name = 'Teste 1' p.save() p = PaymentType() p.id = 4 p.name = 'Teste 4' p.save() else: placeType = PlaceType.objects.get(description='Matriz') place.place_type = placeType phone_type = PhoneType(description='Recado', pk=2) phone_type.save() content_type_temp = ContentType() content_type_temp.save() phone = Phone(area='23', phoneNumber='45679078', ext='4444', phoneType=phone_type, content_type=content_type_temp) phone.content_object = place phone.save() address_type = AddressType(description='Home') address_type.save() address = Address() address.addressPrefix = 'Rua' address.addressLine1 = 'Rui Barbosa, 1234' address.addressLine2 = 'Anexo II - Sala 4' address.neighborhood = 'Centro' address.zipCode = '12345-123' address.addressType = address_type address.city = city address.content_object = place place.save() issuer = Issuer(description='SSP') issuer.save() email_type = EmailType(description='Comercial') email_type.save() instant_message = IMNetwork(description='Hangouts') instant_message.save()
def setup_required_data(): country = Country(name='test', nationality='testing') country.save() place = Place(label='testing place') state = State(name='test', shortName='t', country=country) state.save() city = City(name='test', state=state) city.save() if len(PlaceType.objects.all())==0: placeType = PlaceType(description='Matriz') placeType.save() document = TypeDocument(description='CPF') document.save() a = AddressType(description='Comercial') a.save() room_type = RoomType() room_type.description = 'sala test' room_type.save() plan = Plan() plan.name = 'Teste 1' plan.value = 324.00 plan.duration = 1 plan.staff_size = 1 plan.save() p = PaymentType() p.id = 1 p.name = 'Teste 1' p.save() p = PaymentType() p.id = 4 p.name = 'Teste 4' p.save() else: placeType = PlaceType.objects.get(description='Matriz') place.place_type = placeType phone_type = PhoneType(description='Recado', pk=2) phone_type.save() content_type_temp = ContentType() content_type_temp.save() phone = Phone(area='23', phoneNumber='45679078', ext='4444', phoneType=phone_type, content_type=content_type_temp) phone.content_object = place phone.save() address_type = AddressType(description='Home') address_type.save() address = Address() address.addressPrefix = 'Rua' address.addressLine1 = 'Rui Barbosa, 1234' address.addressLine2 = 'Anexo II - Sala 4' address.neighborhood = 'Centro' address.zipCode = '12345-123' address.addressType = address_type address.city = city address.content_object = place place.save() issuer = Issuer(description='SSP') issuer.save() email_type = EmailType(description='Comercial') email_type.save() instant_message = IMNetwork(description='Hangouts') instant_message.save()