# Path: db_file_storage/storage.py
# class FixedModelDatabaseFileStorage(DatabaseFileStorage):
#     """File storage system that saves files in the database.
# 
#     Intended for use without Models' FileFields, e.g. with Form Wizards.
#     Uses a fixed Model to store the all the saved files.
#     """
# 
#     def __init__(self, *args, **kwargs):
#         try:
#             self.model_class_path = kwargs.pop('model_class_path')
#             self.content_field = kwargs.pop('content_field')
#             self.filename_field = kwargs.pop('filename_field')
#             self.mimetype_field = kwargs.pop('mimetype_field')
#         except KeyError:
#             raise KeyError(
#                 "keyword args 'model_class_path', 'content_field', "
#                 "'filename_field' and 'mimetype_field' are required."
#             )
#         super(FixedModelDatabaseFileStorage, self).__init__(*args, **kwargs)
# 
#     def _get_storage_attributes(self, name):
#         return {
#             'model_class_path': self.model_class_path,
#             'content_field': self.content_field,
#             'filename_field': self.filename_field,
#             'mimetype_field': self.mimetype_field,
#             'filename': name,
#         }
# 
# Path: db_file_storage/compat.py



import os
from django.conf import settings
from django.test import TestCase
from db_file_storage.storage import FixedModelDatabaseFileStorage
from db_file_storage.compat import reverse
from form_wizard_example.models import FormWizardTempFile
# -*- coding: utf-8 -*-
# python
from __future__ import unicode_literals
# django
# third party
# project


class FormWizardTestCase(TestCase):

    def test_fixed_model_storage_requires_fixed_model_fields(self):
        with self.assertRaises(KeyError):

# Path: db_file_storage/storage.py
# class FixedModelDatabaseFileStorage(DatabaseFileStorage):
#     """File storage system that saves files in the database.
# 
#     Intended for use without Models' FileFields, e.g. with Form Wizards.
#     Uses a fixed Model to store the all the saved files.
#     """
# 
#     def __init__(self, *args, **kwargs):
#         try:
#             self.model_class_path = kwargs.pop('model_class_path')
#             self.content_field = kwargs.pop('content_field')
#             self.filename_field = kwargs.pop('filename_field')
#             self.mimetype_field = kwargs.pop('mimetype_field')
#         except KeyError:
#             raise KeyError(
#                 "keyword args 'model_class_path', 'content_field', "
#                 "'filename_field' and 'mimetype_field' are required."
#             )
#         super(FixedModelDatabaseFileStorage, self).__init__(*args, **kwargs)
# 
#     def _get_storage_attributes(self, name):
#         return {
#             'model_class_path': self.model_class_path,
#             'content_field': self.content_field,
#             'filename_field': self.filename_field,
#             'mimetype_field': self.mimetype_field,
#             'filename': name,
#         }
# 
# Path: db_file_storage/compat.py



# Path: demo_and_tests/form_wizard_example/tests.py
import os
from django.conf import settings
from django.test import TestCase
from db_file_storage.storage import FixedModelDatabaseFileStorage
from db_file_storage.compat import reverse
from form_wizard_example.models import FormWizardTempFile

# -*- coding: utf-8 -*-
# python
from __future__ import unicode_literals
# django
# third party
# project


class FormWizardTestCase(TestCase):

    def test_fixed_model_storage_requires_fixed_model_fields(self):
        with self.assertRaises(KeyError):

            FixedModelDatabaseFileStorage()