<s> '''<STR_LIT>''' <EOL> import unittest <EOL> import os <EOL> import json <EOL> import string <EOL> import random <EOL> import getpass <EOL> from datetime import datetime <EOL> from Empire . creds import CredentialManager <EOL> import config <EOL> configuration = config . Configuration ( ) <EOL> credentials_file = configuration . get ( '<STR_LIT>' ) <EOL> credential_key = os . environ . get ( '<STR_LIT>' ) <EOL> if credential_key is None : <EOL> credential_key = getpass . getpass ( '<STR_LIT>' ) <EOL> credential_manager = CredentialManager ( credentials_file , credential_key ) <EOL> config . credential_manager = credential_manager <EOL> from repos . repotracker import RepoTracker <EOL> def id_generator ( size = <NUM_LIT:6> , chars = string . ascii_uppercase + string . digits ) : <EOL> return '<STR_LIT>' . join ( random . choice ( chars ) for _ in range ( size ) ) <EOL> class RepoTrackerTest ( unittest . TestCase ) : <EOL> def setUp ( self ) : <EOL> pass <EOL> def tearDown ( self ) : <EOL> pass <EOL> def test_last_identifier ( self ) : <EOL> repo = RepoTracker ( ) <EOL> temp_identifier = id_generator ( ) <EOL> repo . update_identifier ( "<STR_LIT>" , temp_identifier ) <EOL> fetched_identifier = repo . last_identifier ( "<STR_LIT>" ) <EOL> self . assertEqual ( temp_identifier , fetched_identifier ) <EOL> def test_last_run_completed ( self ) : <EOL> repo = RepoTracker ( ) <EOL> temp_last_run = datetime . utcnow ( ) <EOL> repo . update_last_run_completed ( "<STR_LIT>" , temp_last_run ) <EOL> fetched_last_run = repo . last_run_completed ( "<STR_LIT>" ) <EOL> self . assertEqual ( temp_last_run , fetched_last_run ) </s>
