Minor cosmetic fixes on pytest integration tests.
parent
363e7ac1d9
commit
d601ecba9a
|
@ -1,8 +1,7 @@
|
||||||
from unittest import mock
|
from unittest import mock
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
from rest_framework.reverse import reverse
|
from django.core.urlresolvers import reverse
|
||||||
|
|
||||||
from .. import factories
|
from .. import factories
|
||||||
|
|
||||||
|
@ -20,7 +19,6 @@ def teardown_module(module):
|
||||||
|
|
||||||
|
|
||||||
class TestPublicRegistration:
|
class TestPublicRegistration:
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def setup_class(cls):
|
def setup_class(cls):
|
||||||
cls.form = {"username": "username", "password": "password", "first_name": "fname",
|
cls.form = {"username": "username", "password": "password", "first_name": "fname",
|
||||||
|
@ -39,7 +37,6 @@ class TestPublicRegistration:
|
||||||
|
|
||||||
@pytest.mark.xfail
|
@pytest.mark.xfail
|
||||||
class TestPrivateRegistration:
|
class TestPrivateRegistration:
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def setup_class(cls):
|
def setup_class(cls):
|
||||||
cls.form = {"username": "username", "password": "password", "first_name": "fname",
|
cls.form = {"username": "username", "password": "password", "first_name": "fname",
|
||||||
|
|
|
@ -1,16 +1,14 @@
|
||||||
|
import json
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
from rest_framework.reverse import reverse
|
from django.core.urlresolvers import reverse
|
||||||
|
|
||||||
from .. import factories
|
from .. import factories
|
||||||
|
|
||||||
import json
|
|
||||||
|
|
||||||
|
|
||||||
pytestmark = pytest.mark.django_db
|
pytestmark = pytest.mark.django_db
|
||||||
|
|
||||||
|
|
||||||
class TestListStorageEntries:
|
class TestListStorageEntries(object):
|
||||||
def _load_initial_data(self):
|
def _load_initial_data(self):
|
||||||
self.user1 = factories.UserFactory()
|
self.user1 = factories.UserFactory()
|
||||||
self.user2 = factories.UserFactory()
|
self.user2 = factories.UserFactory()
|
||||||
|
@ -53,7 +51,7 @@ class TestListStorageEntries:
|
||||||
response = client.logout()
|
response = client.logout()
|
||||||
|
|
||||||
|
|
||||||
class TestViewStorageEntries:
|
class TestViewStorageEntries(object):
|
||||||
def _load_initial_data(self):
|
def _load_initial_data(self):
|
||||||
self.user1 = factories.UserFactory()
|
self.user1 = factories.UserFactory()
|
||||||
self.user2 = factories.UserFactory()
|
self.user2 = factories.UserFactory()
|
||||||
|
@ -89,7 +87,7 @@ class TestViewStorageEntries:
|
||||||
response = client.logout()
|
response = client.logout()
|
||||||
|
|
||||||
|
|
||||||
class TestCreateStorageEntries:
|
class TestCreateStorageEntries(object):
|
||||||
@classmethod
|
@classmethod
|
||||||
def setup_class(cls):
|
def setup_class(cls):
|
||||||
cls.form = {"key": "foo",
|
cls.form = {"key": "foo",
|
||||||
|
@ -135,7 +133,7 @@ class TestCreateStorageEntries:
|
||||||
response = client.logout()
|
response = client.logout()
|
||||||
|
|
||||||
|
|
||||||
class TestUpdateStorageEntries:
|
class TestUpdateStorageEntries(object):
|
||||||
@classmethod
|
@classmethod
|
||||||
def setup_class(cls):
|
def setup_class(cls):
|
||||||
cls.form = {"value": "bar"}
|
cls.form = {"value": "bar"}
|
||||||
|
@ -184,7 +182,7 @@ class TestUpdateStorageEntries:
|
||||||
response = client.logout()
|
response = client.logout()
|
||||||
|
|
||||||
|
|
||||||
class TestDeleteStorageEntries:
|
class TestDeleteStorageEntries(object):
|
||||||
def _load_initial_data(self):
|
def _load_initial_data(self):
|
||||||
self.user1 = factories.UserFactory()
|
self.user1 = factories.UserFactory()
|
||||||
self.user2 = factories.UserFactory()
|
self.user2 = factories.UserFactory()
|
||||||
|
|
Loading…
Reference in New Issue