Source

pytest-ghostpy / pytest_ghostpy / wrapper.py

Full commit
'''
wraps the ghost.py base into something with a bit more extra knowledge
'''
from ghost import Ghost

class WrappedGhost(object):
    def __init__(self, base):
        self.base = base
        self.ghost = Ghost()

    def open(self, path, method='get'):
        return self.ghost.open(self.base+path, method)


    def __getattr__(self, attr):
        return getattr(self.ghost, attr)