Bug#754143: Fix the tests to not pollute the data directory

2014-07-13 Thread Christophe Siraut
Hi, Raphael Hertzog écrivait: > I merged an enhanced version of your patch: Great! > I'm waiting your patch for the cleanup left to be done. Here it follows. (Note I tried and failed in getting rid of methods import_key_from_test_file and get_test_file_path in tests_utils, tests_models and tes

Bug#754143: Fix the tests to not pollute the data directory

2014-07-12 Thread Raphael Hertzog
Hi Christophe, On Fri, 11 Jul 2014, Christophe Siraut wrote: > The following patch should solve the issues you mention. Only the > cleanup part remains, I am waiting for your review before doing that. > Note we override the __call__ method instead of setUp, because the > latter gets overriden by t

Bug#754143: Fix the tests to not pollute the data directory

2014-07-11 Thread Christophe Siraut
Hi Raphaël, Raphael Hertzog wrote: > On Wed, 09 Jul 2014, Christophe Siraut wrote: > > > I'm not sure what's the best approach but I see two clean solutions: > > > > > > - something global implemented as a derivative class of TestCase that > > > does the required directory creation and settings

Bug#754143: Fix the tests to not pollute the data directory

2014-07-10 Thread Raphael Hertzog
On Wed, 09 Jul 2014, Christophe Siraut wrote: > > I'm not sure what's the best approach but I see two clean solutions: > > > > - something global implemented as a derivative class of TestCase that > > does the required directory creation and settings change in self.setUp > > and drops the dire

Bug#754143: Fix the tests to not pollute the data directory

2014-07-10 Thread Christophe Siraut
--- distro_tracker/core/tests/cleantestcase.py | 13 + distro_tracker/vendor/debian/tests.py |3 ++- 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 distro_tracker/core/tests/cleantestcase.py diff --git a/distro_tracker/core/tests/cleantestcase.py b/di

Bug#754143: Fix the tests to not pollute the data directory

2014-07-09 Thread Christophe Siraut
> I'm not sure what's the best approach but I see two clean solutions: > > - something global implemented as a derivative class of TestCase that > does the required directory creation and settings change in self.setUp > and drops the directory with a function recorded with self.addCleanup See

Bug#754143: Fix the tests to not pollute the data directory

2014-07-09 Thread Raphael Hertzog
Hi Christophe, On Wed, 09 Jul 2014, Christophe Siraut wrote: > Please review the attached patch. Thanks for the patch but I don't believe that you're following the correct approach here. First, tests should work and behave correctly even without the settings in project/settings/test.py. This fil

Bug#754143: Fix the tests to not pollute the data directory

2014-07-09 Thread Christophe Siraut
Hi, Please review the attached patch. Cheers, Christophe >From 2fa4bbb478f6c2164caae90b898e5efef5a9a9e3 Mon Sep 17 00:00:00 2001 From: Christophe Siraut Date: Wed, 9 Jul 2014 13:56:31 +0200 Subject: [PATCH] Fix the tests to not pollute the data directory --- distro_tracker/project/settings/tes

Bug#754143: Fix the tests to not pollute the data directory

2014-07-07 Thread Raphaël Hertzog
Package: tracker.debian.org Severity: minor After a run of "./manage.py test" you get a few files in the data directory: data/cache: 4a1eaab869bd498dd2218b580f58a891 data/cache: 4a1eaab869bd498dd2218b580f58a891.headers data/cache: 78016d49ce86f47b39d5712970ca07cf data/cache: 78016d49ce86f47b39d571