Skip to content

Instantly share code, notes, and snippets.

@wesrog
Created January 30, 2013 20:15
Show Gist options
  • Save wesrog/4676478 to your computer and use it in GitHub Desktop.
Save wesrog/4676478 to your computer and use it in GitHub Desktop.
from base import BaseTestCase
from tests.lib.actions import HtmlDocument, click_link
from werkzeug.wrappers import Response
response = Response('''
<html>
<head>
<title>Discogs</title>
</head>
<body>
<h1>Discogs</h1>
<p><a href="/releases">Explore Releases</a></p>
</body>
</html>
''')
doc = HtmlDocument(response)
class TestLibActions(BaseTestCase):
def test_click_link(self):
self.assertEqual(click_link(response, 'Explore Releases'), '/releases')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment