def get_good_data(self): InterventionStatusFactory.create() # in case not any in db path = PathFactory.create() return { 'name': 'test', 'date': '2012-08-23', 'structure': default_structure().pk, 'disorders': InterventionDisorderFactory.create().pk, 'comments': '', 'slope': 0, 'area': 0, 'subcontract_cost': 0.0, 'stake': StakeFactory.create().pk, 'height': 0.0, 'project': '', 'width': 0.0, 'length': 0.0, 'status': InterventionStatus.objects.all()[0].pk, 'heliport_cost': 0.0, 'material_cost': 0.0, 'topology': '{"paths": [%s]}' % path.pk, 'manday_set-TOTAL_FORMS': '2', 'manday_set-INITIAL_FORMS': '0', 'manday_set-MAX_NUM_FORMS': '', 'manday_set-0-nb_days': '48.75', 'manday_set-0-job': InterventionJobFactory.create().pk, 'manday_set-0-id': '', 'manday_set-0-DELETE': '', 'manday_set-1-nb_days': '12', 'manday_set-1-job': InterventionJobFactory.create().pk, 'manday_set-1-id': '', 'manday_set-1-DELETE': '', }
def get_good_data(self): InterventionStatusFactory.create() # in case not any in db path = PathFactory.create() return { 'name': 'test', 'date': '2012-08-23', 'disorders': InterventionDisorderFactory.create().pk, 'comments': '', 'slope': 0, 'area': 0, 'subcontract_cost': 0.0, 'stake': StakeFactory.create().pk, 'height': 0.0, 'project': '', 'width': 0.0, 'length': 0.0, 'status': InterventionStatus.objects.all()[0].pk, 'heliport_cost': 0.0, 'material_cost': 0.0, 'topology': '{"paths": [%s]}' % path.pk, 'manday_set-TOTAL_FORMS': '2', 'manday_set-INITIAL_FORMS': '0', 'manday_set-MAX_NUM_FORMS': '', 'manday_set-0-nb_days': '48.75', 'manday_set-0-job': InterventionJobFactory.create().pk, 'manday_set-0-id': '', 'manday_set-0-DELETE': '', 'manday_set-1-nb_days': '12', 'manday_set-1-job': InterventionJobFactory.create().pk, 'manday_set-1-id': '', 'manday_set-1-DELETE': '', }
def get_good_data(self): InterventionStatusFactory.create() # in case not any in db path = PathFactory.create() return { "name": "test", "date": "2012-08-23", "structure": default_structure().pk, "disorders": InterventionDisorderFactory.create().pk, "comments": "", "slope": 0, "area": 0, "subcontract_cost": 0.0, "stake": StakeFactory.create().pk, "height": 0.0, "project": "", "width": 0.0, "length": 0.0, "status": InterventionStatus.objects.all()[0].pk, "heliport_cost": 0.0, "material_cost": 0.0, "topology": '{"paths": [%s]}' % path.pk, "manday_set-TOTAL_FORMS": "2", "manday_set-INITIAL_FORMS": "0", "manday_set-MAX_NUM_FORMS": "", "manday_set-0-nb_days": "48.75", "manday_set-0-job": InterventionJobFactory.create().pk, "manday_set-0-id": "", "manday_set-0-DELETE": "", "manday_set-1-nb_days": "12", "manday_set-1-job": InterventionJobFactory.create().pk, "manday_set-1-id": "", "manday_set-1-DELETE": "", }
def get_good_data(self): InterventionStatusFactory.create() good_data = { 'name': 'test', 'date': '2012-08-23', 'disorders': InterventionDisorderFactory.create().pk, 'comments': '', 'slope': 0, 'area': 0, 'subcontract_cost': 0.0, 'stake': StakeFactory.create().pk, 'height': 0.0, 'project': '', 'width': 0.0, 'length': 0.0, 'status': InterventionStatus.objects.all()[0].pk, 'heliport_cost': 0.0, 'material_cost': 0.0, 'manday_set-TOTAL_FORMS': '2', 'manday_set-INITIAL_FORMS': '0', 'manday_set-MAX_NUM_FORMS': '', 'manday_set-0-nb_days': '48.75', 'manday_set-0-job': InterventionJobFactory.create().pk, 'manday_set-0-id': '', 'manday_set-0-DELETE': '', 'manday_set-1-nb_days': '12', 'manday_set-1-job': InterventionJobFactory.create().pk, 'manday_set-1-id': '', 'manday_set-1-DELETE': '', } if settings.TREKKING_TOPOLOGY_ENABLED: path = PathFactory.create() good_data['topology'] = '{"paths": [%s]}' % path.pk, else: good_data['topology'] = 'SRID=4326;POINT (5.1 6.6)' return good_data