homepage.py 736 Bytes
Newer Older
1 2 3
#pylint: disable=C0111
#pylint: disable=W0621

4
from lettuce import world, step
5
from nose.tools import assert_in, assert_equals
6

Calen Pennington committed
7

8 9
@step(u'I should see the following Partners in the Partners section')
def i_should_see_partner(step):
10 11
    partners = world.browser.find_by_css(".partner .name span")
    names = set(span.text for span in partners)
12 13 14 15 16 17 18 19 20 21 22 23
    for partner in step.hashes:
        assert_in(partner['Partner'], names)


@step(u'I should see the following links and ids')
def should_see_a_link_called(step):
    for link_id_pair in step.hashes:
        link_id = link_id_pair['id']
        text = link_id_pair['Link']
        link = world.browser.find_by_id(link_id)
        assert len(link) > 0
        assert_equals(link.text, text)