From 5f1d84fb9d1600a676953e07bae6cb416d3da261 Mon Sep 17 00:00:00 2001 From: Tyrel Souza Date: Wed, 7 Dec 2016 15:27:54 -0500 Subject: [PATCH] Remove Addgene stuff, make tests pass by changing the proper variable --- dbstorage/migrations/0001_initial.py | 2 -- dbstorage/tests.py | 8 ++++---- tests/settings.py | 1 + 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/dbstorage/migrations/0001_initial.py b/dbstorage/migrations/0001_initial.py index d1430ed..898bef5 100644 --- a/dbstorage/migrations/0001_initial.py +++ b/dbstorage/migrations/0001_initial.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models -from addgene.common.migration import NoBackwards class Migration(migrations.Migration): @@ -23,5 +22,4 @@ class Migration(migrations.Migration): ('b64', models.TextField()), ], ), - NoBackwards(), ] diff --git a/dbstorage/tests.py b/dbstorage/tests.py index 0383f62..0997fd3 100644 --- a/dbstorage/tests.py +++ b/dbstorage/tests.py @@ -21,7 +21,7 @@ class DBFileTest(TestCase): return default_storage.save(self.filepath, f) @override_settings( - DEFAULT_STORAGE="dbstorage.storage.DBStorage") + DEFAULT_FILE_STORAGE="dbstorage.storage.DBStorage") def test_upload(self): """ Test that the file storage uploads and puts in DB Properly """ name = self._upload() @@ -29,7 +29,7 @@ class DBFileTest(TestCase): self.assertTrue(DBFile.objects.filter(name=name).exists()) @override_settings( - DEFAULT_STORAGE="dbstorage.storage.DBStorage") + DEFAULT_FILE_STORAGE="dbstorage.storage.DBStorage") def test_equality(self): """ Test that the DB entry matches what is expected from the file """ name = self._upload() @@ -40,7 +40,7 @@ class DBFileTest(TestCase): self.assertEqual(dbf.content_type, 'image/jpeg') @override_settings( - DEFAULT_STORAGE="dbstorage.storage.DBStorage") + DEFAULT_FILE_STORAGE="dbstorage.storage.DBStorage") def test_open(self): """ Test that the storage mechanism can upload """ name = self._upload() @@ -49,7 +49,7 @@ class DBFileTest(TestCase): self.assertEqual(dbf.read(), f.read()) @override_settings( - DEFAULT_STORAGE="dbstorage.storage.DBStorage") + DEFAULT_FILE_STORAGE="dbstorage.storage.DBStorage") def test_exists(self): """ Test that the storage mechanism can check existance """ name = self._upload() diff --git a/tests/settings.py b/tests/settings.py index 28acf0a..f8464b9 100644 --- a/tests/settings.py +++ b/tests/settings.py @@ -37,6 +37,7 @@ INSTALLED_APPS = [ 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', + 'dbstorage', ] MIDDLEWARE = [