aboutsummaryrefslogtreecommitdiffstats
path: root/pygithub3/tests/requests/test_core.py
diff options
context:
space:
mode:
Diffstat (limited to 'pygithub3/tests/requests/test_core.py')
-rw-r--r--pygithub3/tests/requests/test_core.py17
1 files changed, 2 insertions, 15 deletions
diff --git a/pygithub3/tests/requests/test_core.py b/pygithub3/tests/requests/test_core.py
index 4632056..110f00e 100644
--- a/pygithub3/tests/requests/test_core.py
+++ b/pygithub3/tests/requests/test_core.py
@@ -2,14 +2,12 @@
# -*- encoding: utf-8 -*-
from mock import Mock
-from nose.tools import raises
from pygithub3.tests.utils.core import TestCase
from pygithub3.requests.base import Factory, Body, json, Request
from pygithub3.exceptions import (UriInvalid, RequestDoesNotExist,
ValidationError, InvalidBodySchema)
-from pygithub3.tests.utils.base import (mock_json, DummyRequest,
- DummyRequestValidation)
+from pygithub3.tests.utils.base import mock_json, DummyRequest
from pygithub3.tests.utils.requests import (
RequestWithArgs, RequestCleanedUri, RequestBodyInvalidSchema,
RequestCleanedBody)
@@ -76,7 +74,7 @@ class TestRequestBodyWithSchema(TestCase):
def setUp(self):
valid_body = dict(schema=('arg1', 'arg2'), required=('arg1', ))
- self.b = Body({}, valid_body)
+ self.b = Body({}, **valid_body)
def test_with_body_empty_and_schema_permissive(self):
self.b.schema = ('arg1', 'arg2', '...')
@@ -102,14 +100,3 @@ class TestRequestBodyWithSchema(TestCase):
def test_only_valid_keys(self):
self.b.content = dict(arg1='arg1', arg2='arg2', fake='test')
self.assertEqual(self.b.dumps(), dict(arg1='arg1', arg2='arg2'))
-
-
-class TestBodyValidation(TestCase):
- @raises(ValidationError)
- def test_with_error(self):
- req = DummyRequestValidation(
- body={'foo': 'bar', 'error': 'yes'},
- )
- req.body_schema = {'schema': ('foo',),
- 'required': ('foo',)}
- req.get_body()