Skip to content
This repository has been archived by the owner on Mar 30, 2020. It is now read-only.

Commit

Permalink
FIX tests
Browse files Browse the repository at this point in the history
  • Loading branch information
orsinium committed Jan 3, 2018
1 parent 94eecc1 commit b6385ca
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions tests/django/validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def tearDownClass(cls):
Group.objects.get(name='TEST_IT').delete()
Group.objects.get(name='TEST_IT_2').delete()

def base_validator(self):
def test_base_validator(self):
class Base(djburger.v.b.Form):
name = djburger.f.CharField(max_length=20)
mail = djburger.f.EmailField()
Expand All @@ -33,7 +33,7 @@ class Base(djburger.v.b.Form):
v = Base(request=None, data=data)
self.assertFalse(v.is_valid())

def wrapper_validator(self):
def test_wrapper_validator(self):
class Base(djburger.f.Form):
name = djburger.f.CharField(max_length=20)
mail = djburger.f.EmailField()
Expand Down
6 changes: 3 additions & 3 deletions tests/djside.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def tearDownClass(cls):
Group.objects.get(name='TEST_IT').delete()
Group.objects.get(name='TEST_IT_2').delete()

def pyschemes(self):
def test_pyschemes(self):
with self.subTest(src_text='pyschemes'):
v = djburger.v.c.PySchemes(
{'name': str, 'id': int},
Expand All @@ -32,7 +32,7 @@ def pyschemes(self):
v = v(request=None, data=self.obj)
self.assertTrue(v.is_valid())

def marshmallow(self):
def test_marshmallow(self):
with self.subTest(src_text='marshmallow base'):
class Base(djburger.v.b.Marshmallow):
name = marshmallow.fields.Str()
Expand All @@ -45,7 +45,7 @@ class Base(marshmallow.Schema):
v = Wrapped(request=None, data=self.obj)
self.assertTrue(v.is_valid())

def rest(self):
def test_rest(self):
with self.subTest(src_text='rest framework base'):
class Base(djburger.v.b.RESTFramework):
name = rest_framework.serializers.CharField(max_length=20)
Expand Down
4 changes: 2 additions & 2 deletions tests/marshmallow.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

class MarshmallowValidatorsTest(unittest.TestCase):

def base_validator(self):
def test_base_validator(self):
# BASE
class Base(djburger.v.b.Marshmallow):
name = marshmallow.fields.Str()
Expand All @@ -20,7 +20,7 @@ class Base(djburger.v.b.Marshmallow):
v = Base(request=None, data=data)
self.assertFalse(v.is_valid())

def wrapper_validator(self):
def test_wrapper_validator(self):
class Base(marshmallow.Schema):
name = marshmallow.fields.Str()
mail = marshmallow.fields.Email()
Expand Down
4 changes: 2 additions & 2 deletions tests/pyschemes.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

class PySchemesValidatorsTest(unittest.TestCase):

def base_validator(self):
def test_base_validator(self):
# BASE
with self.subTest(src_text='base pass'):
v = djburger.v.c.PySchemes([str, 2, int])
Expand All @@ -23,7 +23,7 @@ def base_validator(self):
v.is_valid()
self.assertEqual(v.cleaned_data, 3)

def wrapper_validator(self):
def test_wrapper_validator(self):
with self.subTest(src_text='base pass'):
v = djburger.v.w.PySchemes(PySchemes([str, 2, int]))
v = v(request=None, data=['3', 2, 4])
Expand Down
4 changes: 2 additions & 2 deletions tests/rest.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@


class RestValidatorsTest(unittest.TestCase):
def base_validator(self):
def test_base_validator(self):
# BASE
class Base(djburger.v.b.RESTFramework):
name = rest_framework.serializers.CharField(max_length=20)
Expand All @@ -19,7 +19,7 @@ class Base(djburger.v.b.RESTFramework):
v = Base(request=None, data=data)
self.assertFalse(v.is_valid())

def wrapper_validator(self):
def test_wrapper_validator(self):
class Base(rest_framework.serializers.Serializer):
name = rest_framework.serializers.CharField(max_length=20)
mail = rest_framework.serializers.EmailField()
Expand Down

0 comments on commit b6385ca

Please sign in to comment.