# Path: tabun_api/compat.py
# PY2 = sys.version_info.major == 2


import os
import cgi
import time
import pytest
import tabun_api as api
    import urlparse
from io import BytesIO
from tabun_api.compat import urequest, text, text_types, binary, PY2
    from httplib import HTTPMessage
    from http.client import parse_headers
    from urllib import parse as urlparse
def form_intercept():
    def dfunc(url):
        def decorator(f):
            form_interceptors[url] = f
            return f
        return decorator
    try:
        yield dfunc
    finally:
        form_interceptors.clear()


@pytest.yield_fixture(scope='function')
def as_guest():
    global guest_mode
    guest_mode = True
    try:
        yield
    finally:
        guest_mode = False


@pytest.fixture
def user():
    return UserTest()


def load_mocks(new_mocks):
    global current_mocks
    for key, value in new_mocks.items():

# Path: tabun_api/compat.py
# PY2 = sys.version_info.major == 2


# Path: test/testutil.py
import os
import cgi
import time
import pytest
import tabun_api as api
    import urlparse
from io import BytesIO
from tabun_api.compat import urequest, text, text_types, binary, PY2
    from httplib import HTTPMessage
    from http.client import parse_headers
    from urllib import parse as urlparse

def form_intercept():
    def dfunc(url):
        def decorator(f):
            form_interceptors[url] = f
            return f
        return decorator
    try:
        yield dfunc
    finally:
        form_interceptors.clear()


@pytest.yield_fixture(scope='function')
def as_guest():
    global guest_mode
    guest_mode = True
    try:
        yield
    finally:
        guest_mode = False


@pytest.fixture
def user():
    return UserTest()


def load_mocks(new_mocks):
    global current_mocks
    for key, value in new_mocks.items():

        current_mocks[key] = ((value, None) if isinstance(value, text_types) else value)