diff --git a/tests/test_website.py b/tests/test_website.py index 7589230cd9fc7fc31413397e92c8acc034db6c86..7451baa14a82f8c3b3098d9de5f27cd9e653673c 100644 --- a/tests/test_website.py +++ b/tests/test_website.py @@ -21,11 +21,12 @@ from nose.tools import * from webtest import TestApp import logging import urllib +import cgi import mutalyzer from mutalyzer import website -from mutalyzer.util import slow +from mutalyzer.util import slow, skip # TAL logs an awful lot of things with level=DEBUG. On any error, this is all @@ -243,6 +244,32 @@ class TestWSGI(): '<html>', '</html>') + def test_check_interactive_links(self): + """ + Submitting interactively should have links to transcripts also + interactive. + """ + r = self.app.get('/check?name=%s' % urllib.quote('NG_012337.1:g.7055C>T')) + r.mustcontain('0 Errors') + r.mustcontain('"check?name=%s"' % cgi.escape(urllib.quote('NG_012337.1:g.7055C>T'))) + r.mustcontain('"check?name=%s"' % cgi.escape(urllib.quote('NG_012337.1(TIMM8B_v001):c.-30-u2103G>A'))) + r.mustcontain('"check?name=%s"' % cgi.escape(urllib.quote('NG_012337.1(SDHD_v001):c.204C>T'))) + + @skip + def test_check_noninteractive_links(self): + """ + Submitting non-interactively should have links to transcripts also + non-interactive. + + Todo: This is hard to implement in TAL, do this when we move to + another template language. See Trac issue #97. + """ + r = self.app.get('/check?name=%s&standalone=1' % urllib.quote('NG_012337.1:g.7055C>T')) + r.mustcontain('0 Errors') + r.mustcontain('"check?name=%s&standalone=1"' % cgi.escape(urllib.quote('NG_012337.1:g.7055C>T'))) + r.mustcontain('"check?name=%s&standalone=1"' % cgi.escape(urllib.quote('NG_012337.1(TIMM8B_v001):c.-30-u2103G>A'))) + r.mustcontain('"check?name=%s&standalone=1"' % cgi.escape(urllib.quote('NG_012337.1(SDHD_v001):c.204C>T'))) + def test_check_noninteractive_old(self): """ Submit the name checker form non-interactively in the old style.