def given_i_navigate_to_group1(step, url):
    url = django_url(step, url)

    assert url.startswith('http://localhost:8081')

    raw = urlopen(url).read()
    world.dom = html.fromstring(raw)
def given_i_navigate_to_group1(step, url):
    url = django_url(step, url)

    assert url.startswith('http://localhost:'), \
        "Test URL must point to localhost, got: {}".format(url)

    raw = urlopen(url).read()
    world.dom = html.fromstring(raw)
def visit_page(self, page):
    """
    Visit the specific page of the site, e.g.

    .. code-block:: gherkin

        When I visit site page "/users"
    """

    url = urljoin(django_url(self), page)
    self.given('I visit "%s"' % url)
def given_i_navigate_to_group1(step, url):
    base_url = django_url(step)

    # Django 1.4 returns str, not unicode
    try:
        base_url = base_url.decode()
    except AttributeError:
        pass

    assert_equals(base_url, 'http://localhost:8081')
    url = urljoin(base_url, url)

    raw = urlopen(url).read()
    world.dom = html.fromstring(raw)
Exemple #5
0
def access_url(step, url):
    full_url = django_url(step, url)
    response = world.browser.get(full_url)
    world.dom = html.fromstring(response.content)
Exemple #6
0
def access_url(step, url):
    full_url = django_url(step, url)
    response = world.browser.get(full_url)
    world.dom = html.fromstring(response.content)
Exemple #7
0
def go_to_url(step, url):
    world.browser.get(django_url(step) + url)