rename project
This commit is contained in:
parent
5f1d84fb9d
commit
d7f5acdb2c
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 35 KiB |
@ -21,7 +21,7 @@ class DBFileTest(TestCase):
|
|||||||
return default_storage.save(self.filepath, f)
|
return default_storage.save(self.filepath, f)
|
||||||
|
|
||||||
@override_settings(
|
@override_settings(
|
||||||
DEFAULT_FILE_STORAGE="dbstorage.storage.DBStorage")
|
DEFAULT_FILE_STORAGE="dbfilestorage.storage.DBStorage")
|
||||||
def test_upload(self):
|
def test_upload(self):
|
||||||
""" Test that the file storage uploads and puts in DB Properly """
|
""" Test that the file storage uploads and puts in DB Properly """
|
||||||
name = self._upload()
|
name = self._upload()
|
||||||
@ -29,7 +29,7 @@ class DBFileTest(TestCase):
|
|||||||
self.assertTrue(DBFile.objects.filter(name=name).exists())
|
self.assertTrue(DBFile.objects.filter(name=name).exists())
|
||||||
|
|
||||||
@override_settings(
|
@override_settings(
|
||||||
DEFAULT_FILE_STORAGE="dbstorage.storage.DBStorage")
|
DEFAULT_FILE_STORAGE="dbfilestorage.storage.DBStorage")
|
||||||
def test_equality(self):
|
def test_equality(self):
|
||||||
""" Test that the DB entry matches what is expected from the file """
|
""" Test that the DB entry matches what is expected from the file """
|
||||||
name = self._upload()
|
name = self._upload()
|
||||||
@ -40,7 +40,7 @@ class DBFileTest(TestCase):
|
|||||||
self.assertEqual(dbf.content_type, 'image/jpeg')
|
self.assertEqual(dbf.content_type, 'image/jpeg')
|
||||||
|
|
||||||
@override_settings(
|
@override_settings(
|
||||||
DEFAULT_FILE_STORAGE="dbstorage.storage.DBStorage")
|
DEFAULT_FILE_STORAGE="dbfilestorage.storage.DBStorage")
|
||||||
def test_open(self):
|
def test_open(self):
|
||||||
""" Test that the storage mechanism can upload """
|
""" Test that the storage mechanism can upload """
|
||||||
name = self._upload()
|
name = self._upload()
|
||||||
@ -49,7 +49,7 @@ class DBFileTest(TestCase):
|
|||||||
self.assertEqual(dbf.read(), f.read())
|
self.assertEqual(dbf.read(), f.read())
|
||||||
|
|
||||||
@override_settings(
|
@override_settings(
|
||||||
DEFAULT_FILE_STORAGE="dbstorage.storage.DBStorage")
|
DEFAULT_FILE_STORAGE="dbfilestorage.storage.DBStorage")
|
||||||
def test_exists(self):
|
def test_exists(self):
|
||||||
""" Test that the storage mechanism can check existance """
|
""" Test that the storage mechanism can check existance """
|
||||||
name = self._upload()
|
name = self._upload()
|
@ -37,7 +37,7 @@ INSTALLED_APPS = [
|
|||||||
'django.contrib.sessions',
|
'django.contrib.sessions',
|
||||||
'django.contrib.messages',
|
'django.contrib.messages',
|
||||||
'django.contrib.staticfiles',
|
'django.contrib.staticfiles',
|
||||||
'dbstorage',
|
'dbfilestorage',
|
||||||
]
|
]
|
||||||
|
|
||||||
MIDDLEWARE = [
|
MIDDLEWARE = [
|
||||||
|
Loading…
Reference in New Issue
Block a user