diff options
author | 2012-02-09 23:01:12 +0100 | |
---|---|---|
committer | 2012-02-09 23:01:12 +0100 | |
commit | 18a8ed35b0ff6eae1bacbe0220f38a102fe4e321 (patch) | |
tree | a6c51bc90d2494947ef53a66154a074c31992b85 /pygithub3/tests/utils/base.py | |
parent | Core tests (diff) | |
download | python-github3-18a8ed35b0ff6eae1bacbe0220f38a102fe4e321.tar.xz python-github3-18a8ed35b0ff6eae1bacbe0220f38a102fe4e321.zip |
Utils to tests
Diffstat (limited to 'pygithub3/tests/utils/base.py')
-rw-r--r-- | pygithub3/tests/utils/base.py | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/pygithub3/tests/utils/base.py b/pygithub3/tests/utils/base.py new file mode 100644 index 0000000..8b82b67 --- /dev/null +++ b/pygithub3/tests/utils/base.py @@ -0,0 +1,21 @@ +#!/usr/bin/env python +# -*- encoding: utf-8 -*- + +from mock import Mock + +from pygithub3.resources.base import Resource +from pygithub3.requests import Request + + +class DummyResource(Resource): + pass + + +def loads_mock(content): + return content +DummyResource.loads = Mock(side_effect=loads_mock) + + +class DummyRequest(Request): + uri = 'dummyrequest' + resource = DummyResource |