def test_getMarkerData2(): testCoords = '(53.330662, -6.260177)' test_client = app.test_client() response = test_client.get('/markerData/' + testCoords, content_type='html/text') assert b'{\n "0": {\n "LatLng": "(53.341655, -6.236198)", \n "address": "Barrow Street"' in response.data
def test_getMarkerData1(): testCoords = '(53.330662, -6.260177)' test_client = app.test_client() response = test_client.get('/markerData/' + testCoords, content_type='html/text') assert response.status_code == 200
def test_getChartData2(): test_client = app.test_client() response = test_client.get('/availabilityChart/Smithfield+Tuesday', content_type='html/text') assert b'"Measure"' in response.data assert b'"Bikes"' in response.data assert b'"Stands"' in response.data
def test_getChartData1(): test_client = app.test_client() response = test_client.get('/availabilityChart/Smithfield+Tuesday', content_type='html/text') assert response.status_code == 200
def test_getWeatherData2(): #This will fail if the api delivers a faulty JSON test_client = app.test_client() response = test_client.get('/getWeather', content_type='html/text') assert b'"cloudDensity":' in response.data
def test_getWeatherData1(): test_client = app.test_client() response = test_client.get('/getWeather', content_type='html/text') assert response.status_code == 200
def test_page_data(): test_client = app.test_client() response = test_client.get('/', content_type='html/text') assert b'Dublinbikes' in response.data
def test_template_load(): test_client = app.test_client() response = test_client.get('/', content_type='html/text') assert response.status_code == 200