Skip to content

Fix import statements #8

@davidamirkhanov

Description

@davidamirkhanov

input: %s{10}

Traceback (most recent call last):
File "C:/Users/Daria/PycharmProjects/TestCaseGenerator/program.py", line 19, in
data = gen.generate(**arg)
File "C:\Users\Daria\PycharmProjects\TestCaseGenerator\src\generators.py", line 229, in generate
response = self.generate_string(**kwargs)
File "C:\Users\Daria\PycharmProjects\TestCaseGenerator\src\generators.py", line 273, in generate_string
output = ''.join([random.choice(valid_chars) for _ in range(self.parse_int(kwargs['length']))])
File "C:\Users\Daria\PycharmProjects\TestCaseGenerator\src\generators.py", line 273, in
output = ''.join([random.choice(valid_chars) for _ in range(self.parse_int(kwargs['length']))])
AttributeError: 'builtin_function_or_method' object has no attribute 'choice'

Generators.py imports only randint and random from random module, but also uses 'choice'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions