From 56d1346789c2b628aa1af986c101010c426ecc56 Mon Sep 17 00:00:00 2001 From: Christopher Allan Webber Date: Sat, 22 Jun 2013 17:37:30 -0500 Subject: [PATCH] Fix the data integrity bug in test_misc. It turns out this has to do with some additions to the fixture adding of media entries. Since the new fake_upload field is True by default, adding multiple entries that have media_files at once meant that multiple additions of FileKeynames would be added at once if they were not saved at the same time. Tricky! Thankfully, Elrond helped us figure this one out. Thanks, Elrond :) And thanks also to Aapo Rantalainen for sponsoring this commit! --- mediagoblin/tests/test_misc.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mediagoblin/tests/test_misc.py b/mediagoblin/tests/test_misc.py index 6af6bf92..43ad0b6d 100644 --- a/mediagoblin/tests/test_misc.py +++ b/mediagoblin/tests/test_misc.py @@ -29,9 +29,9 @@ def test_user_deletes_other_comments(test_app): user_b = fixture_add_user(u"chris_b") media_a = fixture_media_entry(uploader=user_a.id, save=False, - expunge=False) + expunge=False, fake_upload=False) media_b = fixture_media_entry(uploader=user_b.id, save=False, - expunge=False) + expunge=False, fake_upload=False) Session.add(media_a) Session.add(media_b) Session.flush() -- 2.25.1