Skip to content

Commit

Permalink
Explicitly run doctests for validate_jsonp module, to bump coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
georgedorn committed Aug 27, 2018
1 parent 056c742 commit 92fd7b7
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/validation/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

from basic.models import Note
from testcases import TestCaseWithFixture
from django.test.testcases import SimpleTestCase


@override_settings(ROOT_URLCONF='validation.api.urls')
Expand Down Expand Up @@ -156,3 +157,13 @@ def test_invalid_data(self):
'annotations': ['This field is required.']
}
})


class TestJSONPValidation(SimpleTestCase):
"""
Explicitly run the doctests for tastypie.utils.validate_jsonp
"""
def test_jsonp(self):
import tastypie.utils.validate_jsonp
import doctest
doctest.testmod(tastypie.utils.validate_jsonp)

0 comments on commit 92fd7b7

Please sign in to comment.