Skip to content
Myr

conftest.py

This file

Path

tests/conftest.py

23 lines · 465 bytes · Python

Last changed by

Added tests module.Dmitry Dygalobefore adoption18b26d2

History of this file

Take it

1# coding: utf-82import pytest3from requests.compat import urljoin456def prepare_url(value):7    # Issue #1483: Make sure the URL always has a trailing slash8    httpbin_url = value.url.rstrip('/') + '/'910    def inner(*suffix):11        return urljoin(httpbin_url, '/'.join(suffix))1213    return inner141516@pytest.fixture17def httpbin(httpbin):18    return prepare_url(httpbin)192021@pytest.fixture22def httpbin_secure(httpbin_secure):23    return prepare_url(httpbin_secure)