[server]: Fix Decimal error in manually inserted Luas data
This commit is contained in:
@ -99,155 +99,124 @@ def fetch_luas():
|
||||
|
||||
stops += [
|
||||
{
|
||||
# dawson luas stop
|
||||
"objectID": "LuasStop-DAW",
|
||||
"objectType": "LuasStop",
|
||||
"latitude": 53.34235198108542,
|
||||
"longitude": -6.257874705533702,
|
||||
"latitude": "53.34235198108542",
|
||||
"longitude": "-6.257874705533702",
|
||||
"luasStopName": "Dawson",
|
||||
"luasStopIrishName": "Dásain",
|
||||
"luasStopCode": "DAW",
|
||||
"luasStopLineID": 2,
|
||||
"luasStopLineID": "2"
|
||||
},
|
||||
|
||||
{
|
||||
# westmoreland luas stop
|
||||
"objectID": "LuasStop-WES",
|
||||
"objectType": "LuasStop",
|
||||
"latitude": 53.34657666552001,
|
||||
"longitude": -6.258954552531184,
|
||||
"latitude": "53.34657666552001",
|
||||
"longitude": "-6.258954552531184",
|
||||
"luasStopName": "Westmoreland",
|
||||
"luasStopIrishName": "Sráid Westmoreland",
|
||||
"luasStopCode": "WES",
|
||||
"luasStopLineID": 2,
|
||||
"luasStopLineID": "2"
|
||||
},
|
||||
|
||||
{
|
||||
# o connell gpo
|
||||
"objectID": "LuasStop-OGP",
|
||||
"objectType": "LuasStop",
|
||||
"latitude": 53.34895364842052,
|
||||
"longitude": -6.259870172748866,
|
||||
"latitude": "53.34895364842052",
|
||||
"longitude": "-6.259870172748866",
|
||||
"luasStopName": "O'Connell - GPO",
|
||||
"luasStopIrishName": " Ó Conaill - AOP",
|
||||
"luasStopCode": "OGP",
|
||||
"luasStopLineID": 2,
|
||||
"luasStopLineID": "2"
|
||||
},
|
||||
|
||||
{
|
||||
# o connell upper
|
||||
"objectID": "LuasStop-OUP",
|
||||
"objectType": "LuasStop",
|
||||
"latitude": 53.34897926629319,
|
||||
"longitude": -6.259956003433765,
|
||||
"latitude": "53.34897926629319",
|
||||
"longitude": "-6.259956003433765",
|
||||
"luasStopName": "O'Connell - Upper",
|
||||
"luasStopIrishName": "Ó Conaill Uachtarach",
|
||||
"luasStopCode": "OUP",
|
||||
"luasStopLineID": 2,
|
||||
"luasStopLineID": "2"
|
||||
},
|
||||
|
||||
{
|
||||
# broombridge
|
||||
"objectID": "LuasStop-BRO",
|
||||
"objectType": "LuasStop",
|
||||
"latitude": 53.37238519438793,
|
||||
"longitude": -6.29767637274806,
|
||||
"latitude": "53.37238519438793",
|
||||
"longitude": "-6.29767637274806",
|
||||
"luasStopName": "Broombridge",
|
||||
"luasStopIrishName": "Droichead Broom",
|
||||
"luasStopCode": "BRO",
|
||||
"luasStopLineID": 2,
|
||||
"luasStopLineID": "2"
|
||||
},
|
||||
|
||||
{
|
||||
# cabra
|
||||
"objectID": "LuasStop-CAB",
|
||||
"objectType": "LuasStop",
|
||||
"latitude": 53.3647720048475,
|
||||
"longitude": -6.2818402941276315,
|
||||
"latitude": "53.3647720048475",
|
||||
"longitude": "-6.2818402941276315",
|
||||
"luasStopName": "Cabra",
|
||||
"luasStopIrishName": "Cabrach",
|
||||
"luasStopCode": "CAB",
|
||||
"luasStopLineID": 2,
|
||||
"luasStopLineID": "2"
|
||||
},
|
||||
|
||||
{
|
||||
# phibsborough
|
||||
"objectID": "LuasStop-PHI",
|
||||
"objectType": "LuasStop",
|
||||
"latitude": 53.360531943612585,
|
||||
"longitude": -6.278946230419645,
|
||||
"latitude": "53.360531943612585",
|
||||
"longitude": "-6.278946230419645",
|
||||
"luasStopName": "Phibsborough",
|
||||
"luasStopIrishName": "Baile Phib",
|
||||
"luasStopCode": "PHI",
|
||||
"luasStopLineID": 2,
|
||||
"luasStopLineID": "2"
|
||||
},
|
||||
|
||||
{
|
||||
# grangegorman
|
||||
"objectID": "LuasStop-GRA",
|
||||
"objectType": "LuasStop",
|
||||
"latitude": 53.35733203671144,
|
||||
"longitude": -6.277386018855522,
|
||||
"latitude": "53.35733203671144",
|
||||
"longitude": "-6.277386018855522",
|
||||
"luasStopName": "Grangegorman",
|
||||
"luasStopIrishName": "Gráinseach Ghormáin",
|
||||
"luasStopCode": "GRA",
|
||||
"luasStopLineID": 2,
|
||||
"luasStopLineID": "2"
|
||||
},
|
||||
|
||||
{
|
||||
# broadstone
|
||||
"objectID": "LuasStop-BRD",
|
||||
"objectType": "LuasStop",
|
||||
"latitude": 53.354153216627836,
|
||||
"longitude": -6.27358994584398,
|
||||
"latitude": "53.354153216627836",
|
||||
"longitude": "-6.27358994584398",
|
||||
"luasStopName": "Broadstone - University",
|
||||
"luasStopIrishName": "An Clocháin Leathan",
|
||||
"luasStopCode": "BRD",
|
||||
"luasStopLineID": 2,
|
||||
"luasStopLineID": "2"
|
||||
},
|
||||
{
|
||||
# dominick
|
||||
"objectID": "LuasStop-DOM",
|
||||
"objectType": "LuasStop",
|
||||
"latitude": 53.351380458718346,
|
||||
"longitude": -6.265691018855716,
|
||||
"latitude": "53.351380458718346",
|
||||
"longitude": "-6.265691018855716",
|
||||
"luasStopName": "Dominick",
|
||||
"luasStopIrishName": "Doiminic",
|
||||
"luasStopCode": "DOM",
|
||||
"luasStopLineID": 2,
|
||||
"luasStopLineID": "2"
|
||||
},
|
||||
{
|
||||
# parnell
|
||||
"objectID": "LuasStop-PAR",
|
||||
"objectType": "LuasStop",
|
||||
"latitude": 53.35309164558487,
|
||||
"longitude": -6.260360288173493,
|
||||
"latitude": "53.35309164558487",
|
||||
"longitude": "-6.260360288173493",
|
||||
"luasStopName": "Parnell",
|
||||
"luasStopIrishName": "Sráid Pharnell",
|
||||
"luasStopCode": "PAR",
|
||||
"luasStopLineID": 2,
|
||||
"luasStopLineID": "2"
|
||||
},
|
||||
{
|
||||
# marlborough
|
||||
"objectID": "LuasStop-MAR",
|
||||
"objectType": "LuasStop",
|
||||
"latitude": 53.34937746503714,
|
||||
"longitude": -6.257806103514667,
|
||||
"latitude": "53.34937746503714",
|
||||
"longitude": "-6.257806103514667",
|
||||
"luasStopName": "Marlborough",
|
||||
"luasStopIrishName": "Maoilbhríde",
|
||||
"luasStopCode": "MAR",
|
||||
"luasStopLineID": 2,
|
||||
},
|
||||
{
|
||||
# marlborough
|
||||
"objectID": "LuasStop-MAR",
|
||||
"objectType": "LuasStop",
|
||||
"latitude": 53.34937746503714,
|
||||
"longitude": -6.257806103514667,
|
||||
"luasStopName": "Marlborough",
|
||||
"luasStopIrishName": "Maoilbhríde",
|
||||
"luasStopCode": "MAR",
|
||||
"luasStopLineID": 2,
|
||||
"luasStopLineID": "2"
|
||||
}
|
||||
]
|
||||
|
||||
|
@ -66,7 +66,7 @@ class TestPermanentData(unittest.TestCase):
|
||||
mock_get.return_value.content = 'Abbreviation\tName\tIrishName\tLatitude\tLongitude\tStopID\tLineID\tSortOrder\tIsEnabled\tIsParkAndRide\tIsCycleAndRide\tZoneCountA\tZoneCountB\nABB\tAbbey Street\tSráid na Mainistreach\t53.0\t-6.0\t1\t1\t1\ttrue\tfalse\tfalse\t1\t2'.encode('utf-8-sig')
|
||||
|
||||
result = fetch_luas()
|
||||
self.assertEqual(len(result), 1 + 13)
|
||||
self.assertEqual(len(result), 1 + 12)
|
||||
self.assertEqual(result[0]['luasStopName'], 'Abbey Street')
|
||||
|
||||
@patch('functions.fetch_permanent_data.lambda_function.session.get')
|
||||
|
Reference in New Issue
Block a user