Skip to content

Commit d0aadf1

Browse files
author
Berj Chilingirian
committed
2 parents 0722acb + 9e1741d commit d0aadf1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

aus_senate_audit/audit_recorder.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,13 @@ class AuditRecorder(object):
2525
2626
:ivar str state: The abbreviated name of the state whose senate election is being audited.
2727
"""
28-
def __init__(self, state):
28+
def __init__(self, state, audit_dir=AUDIT_DIR_NAME):
2929
""" Initializes an :class:`AuditResults` object.
3030
3131
:param str state: The abbreviated name of the state whose senate election is being audited.
3232
"""
3333
self._state = state
34+
self.audit_dir = audit_dir
3435
if not exists(self.get_audit_dir_name()):
3536
makedirs('{}/{}'.format(self.get_audit_dir_name(), ROUND_DIR_NAME))
3637
self.record_audit_info(0, 0)
@@ -53,7 +54,7 @@ def get_audit_dir_name(self):
5354
:returns: The audit directory name for the given state.
5455
:rtype: str
5556
"""
56-
return AUDIT_DIR_NAME.format(self._state)
57+
return self.audit_dir.format(self._state)
5758

5859
def get_file_path(self, file_name):
5960
""" Returns the file path for the given file name within the audit directory.

0 commit comments

Comments
 (0)