From 985cb8ec8176c7dc7af7d547a5f5a14fd21165b3 Mon Sep 17 00:00:00 2001 From: Noah Vesely Date: Thu, 3 Nov 2016 19:07:31 -0700 Subject: [PATCH] Use config attrs instead of hardcoding STORE_DIR --- securedrop/tests/test_unit_store.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/securedrop/tests/test_unit_store.py b/securedrop/tests/test_unit_store.py index da632dfbd16..fc8f66cc3fe 100644 --- a/securedrop/tests/test_unit_store.py +++ b/securedrop/tests/test_unit_store.py @@ -49,13 +49,12 @@ def test_get_zip(self): def test_rename_valid_submission(self): sid = 'EQZGCJBRGISGOTC2NZVWG6LILJBHEV3CINNEWSCLLFTUWZJPKJFECLS2NZ4G4U3QOZCFKTTPNZMVIWDCJBBHMUDBGFHXCQ3R' - source_dir = os.path.join('/tmp/securedrop/store/', sid) + source_dir = os.path.join(config.STORE_DIR, sid) if not os.path.exists(source_dir): os.makedirs(source_dir) old_filename = '1-abc1-msg.gpg' - with open(os.path.join(source_dir, old_filename), 'w'): - pass + open(os.path.join(source_dir, old_filename), 'w').close() new_filestem = 'abc2' expected_filename = '1-abc2-msg.gpg'