def _make_bo_and_rack(self): from fixcity.bmabr.models import NYCDOTBulkOrder, User, Rack, CommunityBoard user = User() user.save() cb = CommunityBoard( the_geom='MULTIPOLYGON (((0.0 0.0, 10.0 0.0, 10.0 10.0, 0.0 10.0, 0.0 0.0)))', gid=1, borocd=1, board=1, borough_id=1) cb.save() rack = Rack(location='POINT (5.0 5.0)', date=EPOCH) rack.save() bo = NYCDOTBulkOrder(user=user, communityboard=cb) return bo, rack
def _make_cb(self): from fixcity.bmabr.models import CommunityBoard, Borough from decimal import Decimal borough = Borough(boroname='Brooklyn', gid=1, borocode=1, the_geom=self.geom, shape_leng=Decimal("339789.04731400002"), shape_area=Decimal("635167251.876999974"), ) borough.save() cb = CommunityBoard(gid=1, borocd=1, board=1, the_geom=self.geom, borough=borough) cb.save() return cb