aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/accounts/__init__.py0
-rw-r--r--tests/accounts/models.py8
-rw-r--r--tests/accounts/serializers.py11
-rw-r--r--tests/conftest.py3
-rw-r--r--tests/put_as_create_workspace.txt33
-rw-r--r--tests/records/__init__.py0
-rw-r--r--tests/records/models.py6
-rw-r--r--tests/settings.py3
-rw-r--r--tests/test_serializer_import.py19
-rw-r--r--tests/users/__init__.py0
-rw-r--r--tests/users/models.py6
-rw-r--r--tests/users/serializers.py8
12 files changed, 0 insertions, 97 deletions
diff --git a/tests/accounts/__init__.py b/tests/accounts/__init__.py
deleted file mode 100644
index e69de29b..00000000
--- a/tests/accounts/__init__.py
+++ /dev/null
diff --git a/tests/accounts/models.py b/tests/accounts/models.py
deleted file mode 100644
index 3bf4a0c3..00000000
--- a/tests/accounts/models.py
+++ /dev/null
@@ -1,8 +0,0 @@
-from django.db import models
-
-from tests.users.models import User
-
-
-class Account(models.Model):
- owner = models.ForeignKey(User, related_name='accounts_owned')
- admins = models.ManyToManyField(User, blank=True, null=True, related_name='accounts_administered')
diff --git a/tests/accounts/serializers.py b/tests/accounts/serializers.py
deleted file mode 100644
index 57a91b92..00000000
--- a/tests/accounts/serializers.py
+++ /dev/null
@@ -1,11 +0,0 @@
-from rest_framework import serializers
-
-from tests.accounts.models import Account
-from tests.users.serializers import UserSerializer
-
-
-class AccountSerializer(serializers.ModelSerializer):
- admins = UserSerializer(many=True)
-
- class Meta:
- model = Account
diff --git a/tests/conftest.py b/tests/conftest.py
index 4b33e19c..31142eaf 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -33,9 +33,6 @@ def pytest_configure():
'rest_framework',
'rest_framework.authtoken',
'tests',
- 'tests.accounts',
- 'tests.records',
- 'tests.users',
),
PASSWORD_HASHERS=(
'django.contrib.auth.hashers.SHA1PasswordHasher',
diff --git a/tests/put_as_create_workspace.txt b/tests/put_as_create_workspace.txt
deleted file mode 100644
index 6bc5218e..00000000
--- a/tests/put_as_create_workspace.txt
+++ /dev/null
@@ -1,33 +0,0 @@
-# From test_validation...
-
-class TestPreSaveValidationExclusions(TestCase):
- def test_pre_save_validation_exclusions(self):
- """
- Somewhat weird test case to ensure that we don't perform model
- validation on read only fields.
- """
- obj = ValidationModel.objects.create(blank_validated_field='')
- request = factory.put('/', {}, format='json')
- view = UpdateValidationModel().as_view()
- response = view(request, pk=obj.pk).render()
- self.assertEqual(response.status_code, status.HTTP_200_OK)
-
-
-# From test_permissions...
-
-class ModelPermissionsIntegrationTests(TestCase):
- def setUp(...):
- ...
-
- def test_has_put_as_create_permissions(self):
- # User only has update permissions - should be able to update an entity.
- request = factory.put('/1', {'text': 'foobar'}, format='json',
- HTTP_AUTHORIZATION=self.updateonly_credentials)
- response = instance_view(request, pk='1')
- self.assertEqual(response.status_code, status.HTTP_200_OK)
-
- # But if PUTing to a new entity, permission should be denied.
- request = factory.put('/2', {'text': 'foobar'}, format='json',
- HTTP_AUTHORIZATION=self.updateonly_credentials)
- response = instance_view(request, pk='2')
- self.assertEqual(response.status_code, status.HTTP_403_FORBIDDEN)
diff --git a/tests/records/__init__.py b/tests/records/__init__.py
deleted file mode 100644
index e69de29b..00000000
--- a/tests/records/__init__.py
+++ /dev/null
diff --git a/tests/records/models.py b/tests/records/models.py
deleted file mode 100644
index 76954807..00000000
--- a/tests/records/models.py
+++ /dev/null
@@ -1,6 +0,0 @@
-from django.db import models
-
-
-class Record(models.Model):
- account = models.ForeignKey('accounts.Account', blank=True, null=True)
- owner = models.ForeignKey('users.User', blank=True, null=True)
diff --git a/tests/settings.py b/tests/settings.py
index 91c9ed09..b6736199 100644
--- a/tests/settings.py
+++ b/tests/settings.py
@@ -96,9 +96,6 @@ INSTALLED_APPS = (
'rest_framework',
'rest_framework.authtoken',
'tests',
- 'tests.accounts',
- 'tests.records',
- 'tests.users',
)
# OAuth is optional and won't work if there is no oauth_provider & oauth2
diff --git a/tests/test_serializer_import.py b/tests/test_serializer_import.py
deleted file mode 100644
index d029c3c5..00000000
--- a/tests/test_serializer_import.py
+++ /dev/null
@@ -1,19 +0,0 @@
-# from django.test import TestCase
-
-# from rest_framework import serializers
-# from tests.accounts.serializers import AccountSerializer
-
-
-# class ImportingModelSerializerTests(TestCase):
-# """
-# In some situations like, GH #1225, it is possible, especially in
-# testing, to import a serializer who's related models have not yet
-# been resolved by Django. `AccountSerializer` is an example of such
-# a serializer (imported at the top of this file).
-# """
-# def test_import_model_serializer(self):
-# """
-# The serializer at the top of this file should have been
-# imported successfully, and we should be able to instantiate it.
-# """
-# self.assertIsInstance(AccountSerializer(), serializers.ModelSerializer)
diff --git a/tests/users/__init__.py b/tests/users/__init__.py
deleted file mode 100644
index e69de29b..00000000
--- a/tests/users/__init__.py
+++ /dev/null
diff --git a/tests/users/models.py b/tests/users/models.py
deleted file mode 100644
index 128bac90..00000000
--- a/tests/users/models.py
+++ /dev/null
@@ -1,6 +0,0 @@
-from django.db import models
-
-
-class User(models.Model):
- account = models.ForeignKey('accounts.Account', blank=True, null=True, related_name='users')
- active_record = models.ForeignKey('records.Record', blank=True, null=True)
diff --git a/tests/users/serializers.py b/tests/users/serializers.py
deleted file mode 100644
index 4893ddb3..00000000
--- a/tests/users/serializers.py
+++ /dev/null
@@ -1,8 +0,0 @@
-from rest_framework import serializers
-
-from tests.users.models import User
-
-
-class UserSerializer(serializers.ModelSerializer):
- class Meta:
- model = User