コード例 #1
0
def feed_response(fixture_name):
    """
    Load a fixture into the body of a fake response.

    :return: ``Deferred`` that callbacks with the contents of said fixture
    """
    return succeed(FakeResponse(200, Headers({}), fixture(fixture_name)))
コード例 #2
0
ファイル: test_poller.py プロジェクト: dwcramer/otter
def feed_response(fixture_name):
    """
    Load a fixture into the body of a fake response.

    :return: ``Deferred`` that callbacks with the contents of said fixture
    """
    return succeed(FakeResponse(
        200,
        Headers({}),
        fixture(fixture_name)))
コード例 #3
0
ファイル: test_atom.py プロジェクト: stephamon/otter
 def setUp(self):
     """
     Load simple atom feed fixture
     """
     self.simple_atom = parse(fixture("simple.atom"))
     self.simple_entry = entries(self.simple_atom)[0]
コード例 #4
0
ファイル: test_atom.py プロジェクト: rackerlabs/otter
 def setUp(self):
     """
     Load simple atom feed fixture
     """
     self.simple_atom = parse(fixture("simple.atom"))
     self.simple_entry = entries(self.simple_atom)[0]