Ejemplo n.º 1
0
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
Ejemplo n.º 2
0
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
Ejemplo n.º 3
0
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
Ejemplo n.º 4
0
def test_getChartData1():
    test_client = app.test_client()
    response = test_client.get('/availabilityChart/Smithfield+Tuesday',
                               content_type='html/text')

    assert response.status_code == 200
Ejemplo n.º 5
0
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
Ejemplo n.º 6
0
def test_getWeatherData1():
    test_client = app.test_client()
    response = test_client.get('/getWeather', content_type='html/text')

    assert response.status_code == 200
Ejemplo n.º 7
0
def test_page_data():
    test_client = app.test_client()
    response = test_client.get('/', content_type='html/text')
    assert b'Dublinbikes' in response.data
Ejemplo n.º 8
0
def test_template_load():
    test_client = app.test_client()
    response = test_client.get('/', content_type='html/text')
    assert response.status_code == 200