Merge branch 'master' into development

This commit is contained in:
Roberto Rosario
2014-09-05 14:40:39 -04:00
9 changed files with 90 additions and 6 deletions

View File

@@ -1,4 +1,4 @@
1.0 (2014-07-??)
1.0 (2014-08-27)
================
- New home @ https://github.com/mayan-edms/mayan-edms

View File

@@ -19,6 +19,7 @@ text parsing and OCR capabilities.
`Mailing list (via Google Groups)`_
|Animation|
License
-------
@@ -34,7 +35,7 @@ To install **Mayan EDMS**, simply do:
$ virtualenv venv
$ source venv/bin/activate
$ pip install mayan-edms==1.0.rc3
$ pip install mayan-edms
$ mayan-edms.py initialsetup
$ mayan-edms.py runserver
@@ -65,6 +66,7 @@ Contribute
.. |Coverage Status| image:: http://img.shields.io/coveralls/mayan-edms/mayan-edms/master.svg?style=flat
:target: https://coveralls.io/r/mayan-edms/mayan-edms?branch=master
.. |Logo| image:: https://github.com/mayan-edms/mayan-edms/raw/master/docs/_static/mayan_logo.png
.. |Animation| image:: https://github.com/mayan-edms/mayan-edms/raw/master/docs/_static/overview.gif
.. |Installs badge| image:: http://img.shields.io/pypi/dm/mayan-edms.svg?style=flat
:target: https://crate.io/packages/mayan-edms/
.. |PyPI badge| image:: http://img.shields.io/pypi/v/mayan-edms.svg?style=flat

BIN
docs/_static/overview.gif vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 MiB

View File

@@ -25,7 +25,7 @@ Initialize a ``virtualenv`` to deploy the project:
$ virtualenv venv
$ source venv/bin/activate
$ pip install mayan-edms==1.0.rc3
$ pip install mayan-edms
By default **Mayan EDMS** will create a single file SQLite_ database, which makes
it very easy to start using **Mayan EDMS**. Populate the database with the project's schema doing:

View File

@@ -2,7 +2,7 @@
Mayan EDMS v1.0 release notes
=============================
*July 2014*
*August 26, 2014*
Welcome to Mayan EDMS v1.0!

View File

@@ -1,5 +1,5 @@
__title__ = 'Mayan EDMS'
__version__ = '1.0 rc3'
__version__ = '1.0.0'
__build__ = 0x010000
__author__ = 'Roberto Rosario'
__license__ = 'Apache 2.0'

View File

@@ -22,6 +22,7 @@ TEST_ADMIN_EMAIL = 'admin@admin.com'
TEST_DOCUMENT_PATH = os.path.join(settings.BASE_DIR, 'contrib', 'sample_documents', 'mayan_11_1.pdf')
TEST_SIGNED_DOCUMENT_PATH = os.path.join(settings.BASE_DIR, 'contrib', 'sample_documents', 'mayan_11_1.pdf.gpg')
TEST_DOCUMENT_DESCRIPTION = 'test description'
TEST_DOCUMENT_TYPE = 'test_document_type'
class DocumentTestCase(TestCase):
@@ -278,3 +279,82 @@ class DocumentAPICreateDocumentTestCase(TestCase):
# The document was deleted from the the DB?
self.assertEqual(Document.objects.count(), 0)
class DocumentsViewsFunctionalTestCase(TestCase):
"""
Functional tests to make sure all the moving parts after creating a
document from the frontend are working correctly
"""
def setUp(self):
from sources.models import WebForm
from sources.literals import SOURCE_CHOICE_WEB_FORM
self.admin_user = User.objects.create_superuser(username=TEST_ADMIN_USERNAME, email=TEST_ADMIN_EMAIL, password=TEST_ADMIN_PASSWORD)
self.client = Client()
# Login the admin user
logged_in = self.client.login(username=TEST_ADMIN_USERNAME, password=TEST_ADMIN_PASSWORD)
self.assertTrue(logged_in)
self.assertTrue(self.admin_user.is_authenticated())
# Create new webform source
response = self.client.post(reverse('setup_source_create', args=[SOURCE_CHOICE_WEB_FORM]), {'title': 'test', 'uncompress': 'n', 'enabled': True})
self.assertEqual(WebForm.objects.count(), 1)
# Upload the test document
with open(TEST_DOCUMENT_PATH) as file_descriptor:
response = self.client.post(reverse('upload_interactive'), {'file': file_descriptor})
self.assertEqual(Document.objects.count(), 1)
self.document = Document.objects.first()
def test_document_view(self):
response = self.client.get(reverse('document_list'))
self.assertEqual(response.status_code, 200)
self.assertTrue('List of documents (1)' in response.content)
# test document simple view
response = self.client.get(reverse('document_view_simple', args=[self.document.pk]))
self.assertEqual(response.status_code, 200)
self.assertTrue('Details for: mayan_11_1.pdf' in response.content)
# test document advanced view
response = self.client.get(reverse('document_view_advanced', args=[self.document.pk]))
self.assertEqual(response.status_code, 200)
self.assertTrue('Document properties for: mayan_11_1.pdf' in response.content)
def test_document_type_views(self):
# Check that there are no document types
response = self.client.get(reverse('document_type_list'))
self.assertEqual(response.status_code, 200)
self.assertTrue('List of document types (0)' in response.content)
# Create a document type
response = self.client.post(reverse('document_type_create'), data={'name': TEST_DOCUMENT_TYPE}, follow=True)
self.assertEqual(response.status_code, 200)
self.assertTrue('Document type created successfully' in response.content)
# Check that there is one document types
response = self.client.get(reverse('document_type_list'))
self.assertEqual(response.status_code, 200)
self.assertTrue('List of document types (1)' in response.content)
document_type = DocumentType.objects.first()
self.assertEqual(document_type.name, TEST_DOCUMENT_TYPE)
# Edit the document type
response = self.client.post(reverse('document_type_edit', args=[document_type.pk]), data={'name': TEST_DOCUMENT_TYPE + 'partial'}, follow=True)
self.assertEqual(response.status_code, 200)
self.assertTrue('Document type edited successfully' in response.content)
document_type = DocumentType.objects.first()
self.assertEqual(document_type.name, TEST_DOCUMENT_TYPE + 'partial')
# Delete the document type
response = self.client.post(reverse('document_type_delete', args=[document_type.pk]), follow=True)
self.assertEqual(response.status_code, 200)
self.assertTrue('Document type: {0} deleted successfully'.format(document_type.name) in response.content)
# Check that there are no document types
response = self.client.get(reverse('document_type_list'))
self.assertEqual(response.status_code, 200)
self.assertTrue('List of document types (0)' in response.content)

3
mayan/settings/local.py Normal file
View File

@@ -0,0 +1,3 @@
from __future__ import absolute_import
from .base import *

View File

@@ -3,4 +3,3 @@ from .local import *
DEBUG = False
ALLOWED_HOSTS = ['*'] # Update this accordingly; https://docs.djangoproject.com/en/dev/ref/settings/#allowed-hosts
~