def test_no_output_file_flag(self): args = scrammer.parse_args(['hello']) assert args.output_file is None
def test_default_format(self): args = scrammer.parse_args(['hello']) assert args.format == 'hex'
def test_output_file_flag_true(self): args = scrammer.parse_args(['hello', '-o', 'hi.txt']) assert args.output_file == 'hi.txt'
def test_arg_in_arg_namespace(self, arg): args = scrammer.parse_args(self.ONLY_PLAINTEXT) assert arg in args
def test_output_switches(self, mode): args = scrammer.parse_args(['hello', '--format', mode]) assert args.format == mode
def test_format_short(self): args = scrammer.parse_args(['hello', '-fmt', 'b64']) assert args.format == 'b64'
def test_format_long(self): args = scrammer.parse_args(['hello', '--format', 'b64']) assert args.format == 'b64'
def test_passed_iterations_short(self): args = scrammer.parse_args(['hello', '-i', '5000']) assert args.iterations == 5000
def test_passed_iterations_long(self): args = scrammer.parse_args(['hello', '--iter', '5000']) assert args.iterations == 5000
def test_passed_salt_long(self): args = scrammer.parse_args(['hello', '--salt', 'QSXCR+Q6sek8bf92']) assert args.salt == 'QSXCR+Q6sek8bf92'
def test_no_plaintext(self): args = scrammer.parse_args([]) assert args.plaintext is None
def test_passed_plaintext(self): args = scrammer.parse_args(['hello']) assert args.plaintext == 'hello'
def test_default_iterations(self): args = scrammer.parse_args(['hello']) assert args.iterations == 4096
def test_default_salt(self): args = scrammer.parse_args(['hello']) assert args.salt is None