Remove Addgene stuff, make tests pass by changing the proper variable
This commit is contained in:
parent
f878d1ff64
commit
5f1d84fb9d
|
@ -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(),
|
||||
]
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -37,6 +37,7 @@ INSTALLED_APPS = [
|
|||
'django.contrib.sessions',
|
||||
'django.contrib.messages',
|
||||
'django.contrib.staticfiles',
|
||||
'dbstorage',
|
||||
]
|
||||
|
||||
MIDDLEWARE = [
|
||||
|
|
Loading…
Reference in New Issue
Block a user