Skip to content

Commit

Permalink
Use config attrs instead of hardcoding STORE_DIR
Browse files Browse the repository at this point in the history
  • Loading branch information
Noah Vesely committed Nov 4, 2016
1 parent 8f458a8 commit 985cb8e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions securedrop/tests/test_unit_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit 985cb8e

Please sign in to comment.