# Path: findingaids/content/forms.py
# class FeedbackForm(forms.Form):
# class RequestMaterialsForm(forms.Form):
#     def __init__(self, data=None, remote_ip=None, **kwargs):
#     def send_email(self):
# def generate_from_email(data):
#     def send_email(self):
# 
# Path: findingaids/fa/models.py
# class Archive(models.Model):
#     '''Model to define Archives associated with EAD documents, for use with
#     admin user permissions and to identify subversion repositories where
#     content will be published from.'''
#     label = models.CharField(max_length=10,
#         help_text='Short label to identify an archive')
#     name = models.CharField(max_length=255,
#         help_text='repository name (subarea) in EAD to identify finding aids associated with this archive')
#     svn = models.URLField('Subversion Repository',
#         help_text='URL to subversion repository containing EAD for this archive')
#     slug = models.SlugField(help_text='''shorthand id
#         (auto-generated from label; do not modify after initial archive definition)''')
#     contacts = models.ManyToManyField(settings.AUTH_USER_MODEL,
#         help_text='Contact person for display on the Request Materials page (email required)',
#         blank=True)
# 
# 
#     def __unicode__(self):
#         return self.label
# 
#     @property
#     def svn_local_path(self):
#         return os.path.join(settings.SVN_WORKING_DIR, self.slug)
# 
#     def contact_names(self):
#         '''List of contact names method for display in django admin list
#         display.  Shows email if user has no full name.'''
#         return ', '.join([contact.get_full_name() or contact.email
#                           for contact in self.contacts.all()])
#     contact_names.short_description = "Contacts"


from os import path
from unittest import skip
from django.test import Client
from django.conf import settings
from django.core.urlresolvers import reverse
from eulexistdb.testutil import TestCase as EulexistdbTestCase
from eullocal.django.forms.tests import MockCaptcha
from findingaids.content import forms
from findingaids.fa.models import Archive
        settings.EMAIL_SUBJECT_PREFIX = self.email_prefix
        settings.FEEDBACK_EMAIL = self.feedback_email

        # swap out captcha with mock
        self._captcha = forms.captchafield.captcha
        forms.captchafield.captcha = MockCaptcha()
        # set required captcha configs
        self._captcha_private_key = getattr(settings, 'RECAPTCHA_PRIVATE_KEY', None)
        self._captcha_public_key = getattr(settings, 'RECAPTCHA_PUBLIC_KEY', None)
        settings.RECAPTCHA_PRIVATE_KEY = 'mine & mine alone'
        settings.RECAPTCHA_PUBLIC_KEY = 'anyone can see this'

    def tearDown(self):
        # restore real send_mail
        forms.send_mail = self._send_mail
        # restore email settings
        if self._server_email is None:
            delattr(settings, 'SERVER_EMAIL')
        else:
            settings.SERVER_EMAIL = self._server_email
        if self._email_prefix is None:
            delattr(settings.EMAIL_SUBJECT_PREFIX)
        else:
            settings.EMAIL_SUBJECT_PREFIX = self._email_prefix
        if self._feedback_email is None:
            delattr(settings, 'FEEDBACK_EMAIL')
        else:
            settings.FEEDBACK_EMAIL = self._feedback_email

        # restore real captcha

# Path: findingaids/content/forms.py
# class FeedbackForm(forms.Form):
# class RequestMaterialsForm(forms.Form):
#     def __init__(self, data=None, remote_ip=None, **kwargs):
#     def send_email(self):
# def generate_from_email(data):
#     def send_email(self):
# 
# Path: findingaids/fa/models.py
# class Archive(models.Model):
#     '''Model to define Archives associated with EAD documents, for use with
#     admin user permissions and to identify subversion repositories where
#     content will be published from.'''
#     label = models.CharField(max_length=10,
#         help_text='Short label to identify an archive')
#     name = models.CharField(max_length=255,
#         help_text='repository name (subarea) in EAD to identify finding aids associated with this archive')
#     svn = models.URLField('Subversion Repository',
#         help_text='URL to subversion repository containing EAD for this archive')
#     slug = models.SlugField(help_text='''shorthand id
#         (auto-generated from label; do not modify after initial archive definition)''')
#     contacts = models.ManyToManyField(settings.AUTH_USER_MODEL,
#         help_text='Contact person for display on the Request Materials page (email required)',
#         blank=True)
# 
# 
#     def __unicode__(self):
#         return self.label
# 
#     @property
#     def svn_local_path(self):
#         return os.path.join(settings.SVN_WORKING_DIR, self.slug)
# 
#     def contact_names(self):
#         '''List of contact names method for display in django admin list
#         display.  Shows email if user has no full name.'''
#         return ', '.join([contact.get_full_name() or contact.email
#                           for contact in self.contacts.all()])
#     contact_names.short_description = "Contacts"


# Path: findingaids/content/tests.py
from os import path
from unittest import skip
from django.test import Client
from django.conf import settings
from django.core.urlresolvers import reverse
from eulexistdb.testutil import TestCase as EulexistdbTestCase
from eullocal.django.forms.tests import MockCaptcha
from findingaids.content import forms
from findingaids.fa.models import Archive

        settings.EMAIL_SUBJECT_PREFIX = self.email_prefix
        settings.FEEDBACK_EMAIL = self.feedback_email

        # swap out captcha with mock
        self._captcha = forms.captchafield.captcha
        forms.captchafield.captcha = MockCaptcha()
        # set required captcha configs
        self._captcha_private_key = getattr(settings, 'RECAPTCHA_PRIVATE_KEY', None)
        self._captcha_public_key = getattr(settings, 'RECAPTCHA_PUBLIC_KEY', None)
        settings.RECAPTCHA_PRIVATE_KEY = 'mine & mine alone'
        settings.RECAPTCHA_PUBLIC_KEY = 'anyone can see this'

    def tearDown(self):
        # restore real send_mail
        forms.send_mail = self._send_mail
        # restore email settings
        if self._server_email is None:
            delattr(settings, 'SERVER_EMAIL')
        else:
            settings.SERVER_EMAIL = self._server_email
        if self._email_prefix is None:
            delattr(settings.EMAIL_SUBJECT_PREFIX)
        else:
            settings.EMAIL_SUBJECT_PREFIX = self._email_prefix
        if self._feedback_email is None:
            delattr(settings, 'FEEDBACK_EMAIL')
        else:
            settings.FEEDBACK_EMAIL = self._feedback_email

        # restore real captcha

        forms.captchafield.captcha = self._captcha