aboutsummaryrefslogtreecommitdiffstats
path: root/pygithub3/tests
diff options
context:
space:
mode:
authorDavid Medina <davidmedina9@gmail.com>2012-02-07 22:51:46 +0100
committerDavid Medina <davidmedina9@gmail.com>2012-02-07 22:51:46 +0100
commitde2c7806ca52e9c5470705f5ebb4955f8ba3942c (patch)
tree4027b5d9b166e08ed00b1fd144d1f0e69daeb4ad /pygithub3/tests
parentClean requests interface (diff)
downloadpython-github3-de2c7806ca52e9c5470705f5ebb4955f8ba3942c.tar.xz
python-github3-de2c7806ca52e9c5470705f5ebb4955f8ba3942c.zip
Fix litle bugs
Diffstat (limited to 'pygithub3/tests')
-rw-r--r--pygithub3/tests/test_errors.py33
1 files changed, 0 insertions, 33 deletions
diff --git a/pygithub3/tests/test_errors.py b/pygithub3/tests/test_errors.py
index 36f33d9..aee3da5 100644
--- a/pygithub3/tests/test_errors.py
+++ b/pygithub3/tests/test_errors.py
@@ -1,36 +1,3 @@
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
-from unittest import TestCase
-from requests.exceptions import HTTPError
-from core import client
-import errors
-import json
-
-class TestErrorsWithoutAuth(TestCase):
- """docstring for TestRequestsLibrary"""
-
- def setUp(self):
- self.client = client.Client()
-
- def test_malformed_url(self):
- self.assertRaises(HTTPError, self.client.request, 'get', 'fake')
-
-class TestErrorsAuthenticated(TestCase):
- """docstring for TestErrorsAuthenticaed"""
-
- def setUp(self):
- self.client = client.Client(
- login='pygit',
- password='pygithub3'
- )
-
- def test_400_parsing_json(self):
- data = 'strinf'
- self.assertRaises(errors.BadRequest, self.client.request,
- 'post', 'user/repos', data=data)
-
- def test_400_json_hash(self):
- data = json.dumps({'names': 'david'})
- with self.assertRaises(errors.UnprocessableEntity) as cm:
- self.client.request('post', 'user/repos', data=data)