"""Test analysis page."""


def test_analysis(webapp):
    """Test we can analyse a page."""
    response = webapp.get('/analyse/646e73747769737465722e7265706f7274')

    assert response.status_code == 200
    assert 'Use these tools to safely analyse dnstwister.report' in response.body

@@ -19,16 +19,49 @@
 age.%22%22%22%0A
+import pytest%0Aimport webtest.app%0A
 %0A%0Adef te
@@ -314,8 +314,253 @@
 se.body%0A
+%0A%0Adef test_bad_domain_fails(webapp):%0A    %22%22%22Test the analyse page checks domain validity.%22%22%22%0A    with pytest.raises(webtest.app.AppError) as err:%0A        webapp.get('/analyse/3234jskdnfsdf7y34')%0A    assert '400 BAD REQUEST' in err.value.message%0A

Test analyse page checks domain validity