diff --git a/HISTORY.rst b/HISTORY.rst index 0ef5a37b0d..7b5937b3fd 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -1,4 +1,4 @@ -1.0 (2014-07-??) +1.0 (2014-08-27) ================ - New home @ https://github.com/mayan-edms/mayan-edms diff --git a/README.rst b/README.rst index 6a3c5f54b9..f8a07033de 100644 --- a/README.rst +++ b/README.rst @@ -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 diff --git a/docs/_static/overview.gif b/docs/_static/overview.gif new file mode 100644 index 0000000000..de076555f6 Binary files /dev/null and b/docs/_static/overview.gif differ diff --git a/docs/intro/installation.rst b/docs/intro/installation.rst index 3dad77e42f..21e5aaf05b 100644 --- a/docs/intro/installation.rst +++ b/docs/intro/installation.rst @@ -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: diff --git a/docs/releases/1.0.rst b/docs/releases/1.0.rst index 9173c0e9ee..b927dde7e6 100644 --- a/docs/releases/1.0.rst +++ b/docs/releases/1.0.rst @@ -2,7 +2,7 @@ Mayan EDMS v1.0 release notes ============================= -*July 2014* +*August 26, 2014* Welcome to Mayan EDMS v1.0! diff --git a/mayan/__init__.py b/mayan/__init__.py index fbb2a7fb86..247c61abcb 100644 --- a/mayan/__init__.py +++ b/mayan/__init__.py @@ -1,5 +1,5 @@ __title__ = 'Mayan EDMS' -__version__ = '1.0 rc3' +__version__ = '1.0.0' __build__ = 0x010000 __author__ = 'Roberto Rosario' __license__ = 'Apache 2.0' diff --git a/mayan/apps/documents/tests.py b/mayan/apps/documents/tests.py index 64166177c9..57830075aa 100644 --- a/mayan/apps/documents/tests.py +++ b/mayan/apps/documents/tests.py @@ -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) diff --git a/mayan/settings/local.py b/mayan/settings/local.py new file mode 100644 index 0000000000..e13328181e --- /dev/null +++ b/mayan/settings/local.py @@ -0,0 +1,3 @@ +from __future__ import absolute_import + +from .base import * diff --git a/mayan/settings/production.py b/mayan/settings/production.py index 7ede99d948..b8b0de1a1f 100644 --- a/mayan/settings/production.py +++ b/mayan/settings/production.py @@ -3,4 +3,3 @@ from .local import * DEBUG = False ALLOWED_HOSTS = ['*'] # Update this accordingly; https://docs.djangoproject.com/en/dev/ref/settings/#allowed-hosts -~