From b28bdf5475041526e40759d8951fc2b0c3922e8b Mon Sep 17 00:00:00 2001 From: Roberto Rosario Date: Tue, 14 May 2019 17:48:53 -0400 Subject: [PATCH] Add document statistics test Signed-off-by: Roberto Rosario --- mayan/apps/documents/tests/test_statistics.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 mayan/apps/documents/tests/test_statistics.py diff --git a/mayan/apps/documents/tests/test_statistics.py b/mayan/apps/documents/tests/test_statistics.py new file mode 100644 index 0000000000..dea2499776 --- /dev/null +++ b/mayan/apps/documents/tests/test_statistics.py @@ -0,0 +1,18 @@ +from __future__ import unicode_literals + +from mayan.apps.common.tests import BaseTestCase + +from ..statistics import namespace + + +class DocumentStatisticsTestCase(BaseTestCase): + def test_namespace(self): + for statistic in namespace.statistics: + try: + statistic.execute() + except Exception as exception: + self.fail( + 'Error executing: {}; {}'.format(statistic, exception) + ) + raise +