Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_version_micro_m1_automatic():
args = cli.parse(['--micro', '12345'])
qr = cli.make_code(args)
assert 'M1' == qr.version
def test_pattern2():
args = cli.parse(['--pattern', '5', ''])
assert args.pattern == 5
qr = cli.make_code(args)
assert qr.mask == 5
def test_version():
args = cli.parse(['-v', '1', ''])
assert args.version == '1'
qr = cli.make_code(args)
assert 1 == qr.version
def test_version_micro_m1():
args = cli.parse(['-v', 'M1', '12345'])
assert args.version == 'M1'
qr = cli.make_code(args)
assert 'M1' == qr.version
def test_micro_false():
args = cli.parse(['--no-micro', ''])
assert not args.micro
qr = cli.make_code(args)
assert not qr.is_micro
def test_error():
args = cli.parse(['-e', 'm', ''])
assert args.error == 'M'
qr = cli.make_code(args)
assert 'H' == qr.error
def test_error4():
args = cli.parse(['--error=q', '--no-error-boost', ''])
assert args.error == 'Q'
qr = cli.make_code(args)
assert 'Q' == qr.error
def test_mode():
args = cli.parse(['-m', 'alphanumeric', 'A'])
assert args.mode == 'alphanumeric'
qr = cli.make_code(args)
assert 'alphanumeric' == qr.mode
def test_micro_true():
args = cli.parse(['--micro', ''])
assert args.micro
qr = cli.make_code(args)
assert qr.is_micro
def test_error2():
args = cli.parse(['-e', 'M', ''])
assert args.error == 'M'
qr = cli.make_code(args)
assert 'H' == qr.error