-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #71 from lingfish/master
ValidatorSQL class doesn't handle/pass allow_unknown
- Loading branch information
Showing
2 changed files
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
import eve_sqlalchemy.validation | ||
from eve_sqlalchemy.tests.test_settings_sql import DOMAIN | ||
from eve.utils import config | ||
|
||
import unittest | ||
|
||
|
||
class TestValidator(unittest.TestCase): | ||
def setUp(self): | ||
schemas = { | ||
'mock_string': { | ||
'type': 'string', | ||
}, | ||
} | ||
# This is usually set in a users' app | ||
DOMAIN['people'].update({ | ||
'allow_unknown': True, | ||
}) | ||
config.DOMAIN = DOMAIN | ||
self.validator = eve_sqlalchemy.validation.ValidatorSQL(schemas, resource='people') | ||
|
||
def test_allow_unknown_true(self): | ||
self.assertTrue(self.validator.allow_unknown) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters