From 4f2744f916c9fc02f0a2ff7d921aff379446b520 Mon Sep 17 00:00:00 2001 From: Roberto Rosario Date: Thu, 30 Jun 2016 14:40:18 -0400 Subject: [PATCH 1/3] Add missing link to the 2.1.3 release notes in the index file. --- docs/releases/index.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/releases/index.rst b/docs/releases/index.rst index 8af72af3ff..9e1e8e3a91 100644 --- a/docs/releases/index.rst +++ b/docs/releases/index.rst @@ -22,6 +22,7 @@ versions of the documentation contain the release notes for any later releases. .. toctree:: :maxdepth: 1 + 2.1.3 2.1.2 2.1.1 2.1 From 4b7c4335e14e69e936acd363368e306f99695c29 Mon Sep 17 00:00:00 2001 From: Roberto Rosario Date: Thu, 30 Jun 2016 16:02:17 -0400 Subject: [PATCH 2/3] Improve TempfileCheckMixin. --- mayan/apps/common/tests/mixins.py | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/mayan/apps/common/tests/mixins.py b/mayan/apps/common/tests/mixins.py index 844585ecef..9861b9e278 100644 --- a/mayan/apps/common/tests/mixins.py +++ b/mayan/apps/common/tests/mixins.py @@ -8,20 +8,22 @@ from ..settings import setting_temporary_directory class TempfileCheckMixin(object): - def _get_temporary_entries_count(self): - return len(os.listdir(setting_temporary_directory.value)) + def _get_temporary_entries(self): + return os.listdir(setting_temporary_directory.value) def setUp(self): super(TempfileCheckMixin, self).setUp() - self._temporary_items = self._get_temporary_entries_count() + self._temporary_entries = self._get_temporary_entries() def tearDown(self): - self.assertEqual( - self._temporary_items, self._get_temporary_entries_count(), - msg='Orphan temporary file. The number of temporary file and ' - 'directories at the start and at the end of the test are not the ' - 'same.' - ) + for temporary_entry in self._get_temporary_entries(): + self.assertFalse( + temporary_entry not in self._temporary_entries, + msg='Orphan temporary file. The number of temporary file and ' + 'directories at the start and at the end of the test are not the ' + 'same.' + ) + super(TempfileCheckMixin, self).tearDown() @@ -41,7 +43,8 @@ class OpenFileCheckMixin(object): def tearDown(self): if not getattr(self, '_skip_file_descriptor_test', False): for new_open_file in self._get_open_files(): - self.assertFalse(new_open_file not in self._open_files, + self.assertFalse( + new_open_file not in self._open_files, msg='File descriptor leak. The number of file descriptors ' 'at the start and at the end of the test are not the same.' ) From ce8377da03fb6c654f702341ffa3cddbe2499119 Mon Sep 17 00:00:00 2001 From: Roberto Rosario Date: Thu, 30 Jun 2016 16:03:17 -0400 Subject: [PATCH 3/3] Update changelog. --- HISTORY.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/HISTORY.rst b/HISTORY.rst index 93d192eea4..e23a871fd3 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -1,4 +1,10 @@ +2.1.4 (2016-XX-XX) +================== +- Add missing link to the 2.1.3 release notes in the index file. +- Improve TempfileCheckMixin. + 2.1.3 (2016-06-29) +================== - Add help message when initialsetup migration phase fails. Relates to GitLab issue #296. - Start using self.setdout instead of print as per documentation. - Fix GitLab issue #295, "When editing a user the top bar jumps to the name of the user".