Exemple #1
0
 def test_no_output_file_flag(self):
     args = scrammer.parse_args(['hello'])
     assert args.output_file is None
Exemple #2
0
 def test_default_format(self):
     args = scrammer.parse_args(['hello'])
     assert args.format == 'hex'
Exemple #3
0
 def test_output_file_flag_true(self):
     args = scrammer.parse_args(['hello', '-o', 'hi.txt'])
     assert args.output_file == 'hi.txt'
Exemple #4
0
 def test_arg_in_arg_namespace(self, arg):
     args = scrammer.parse_args(self.ONLY_PLAINTEXT)
     assert arg in args
Exemple #5
0
 def test_output_switches(self, mode):
     args = scrammer.parse_args(['hello', '--format', mode])
     assert args.format == mode
Exemple #6
0
 def test_format_short(self):
     args = scrammer.parse_args(['hello', '-fmt', 'b64'])
     assert args.format == 'b64'
Exemple #7
0
 def test_format_long(self):
     args = scrammer.parse_args(['hello', '--format', 'b64'])
     assert args.format == 'b64'
Exemple #8
0
 def test_passed_iterations_short(self):
     args = scrammer.parse_args(['hello', '-i', '5000'])
     assert args.iterations == 5000
Exemple #9
0
 def test_passed_iterations_long(self):
     args = scrammer.parse_args(['hello', '--iter', '5000'])
     assert args.iterations == 5000
Exemple #10
0
 def test_passed_salt_long(self):
     args = scrammer.parse_args(['hello', '--salt', 'QSXCR+Q6sek8bf92'])
     assert args.salt == 'QSXCR+Q6sek8bf92'
Exemple #11
0
 def test_no_plaintext(self):
     args = scrammer.parse_args([])
     assert args.plaintext is None
Exemple #12
0
 def test_passed_plaintext(self):
     args = scrammer.parse_args(['hello'])
     assert args.plaintext == 'hello'
Exemple #13
0
 def test_default_iterations(self):
     args = scrammer.parse_args(['hello'])
     assert args.iterations == 4096
Exemple #14
0
 def test_default_salt(self):
     args = scrammer.parse_args(['hello'])
     assert args.salt is None