aboutsummaryrefslogtreecommitdiffstats
path: root/pygithub3/tests/utils/base.py
diff options
context:
space:
mode:
authorNat Williams <nwilliams@leapfrogonline.com>2012-04-17 17:35:31 -0500
committerNat Williams <nwilliams@leapfrogonline.com>2012-04-17 17:35:31 -0500
commit4539f80aa44e500422c5071d8e3d74de321b6225 (patch)
tree2efa8b3e2eaa19de229209b6d316e098944399d2 /pygithub3/tests/utils/base.py
parentmore specific exception for missing Request classes (diff)
downloadpython-github3-4539f80aa44e500422c5071d8e3d74de321b6225.tar.xz
python-github3-4539f80aa44e500422c5071d8e3d74de321b6225.zip
add pull request API
there are a few little issues remaining. Mostly regarding handling meaningful non-20x response codes
Diffstat (limited to 'pygithub3/tests/utils/base.py')
-rw-r--r--pygithub3/tests/utils/base.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/pygithub3/tests/utils/base.py b/pygithub3/tests/utils/base.py
index fb519e9..b3c3b76 100644
--- a/pygithub3/tests/utils/base.py
+++ b/pygithub3/tests/utils/base.py
@@ -14,7 +14,7 @@ def mock_json(content):
def mock_response(status_code='get', content={}):
CODES = dict(get=200, patch=200, post=201, delete=204)
response = Mock(name='response')
- response.status_code = CODES[str(status_code).lower()] or status_code
+ response.status_code = CODES.get(str(status_code).lower(), status_code)
response.content = content
return response