All checks were successful
continuous-integration/drone/push Build is passing
* Added Behave BDD Tests for User Service * Added Swagger Docs for User Service * Added Vault, Redpanda helm config (not yet being used) * Added frontend config for host / port when running locally
25 lines
627 B
Python
25 lines
627 B
Python
import string
|
|
import random
|
|
|
|
|
|
def before_feature(context, feature):
|
|
context.feat = {}
|
|
context.feat['username'] = generate_username(8)
|
|
context.feat['password'] = generate_password(16)
|
|
|
|
|
|
def before_scenario(context, scenario):
|
|
context.headers = {}
|
|
context.params = {}
|
|
context.response = None
|
|
|
|
|
|
def generate_username(length):
|
|
letters = string.ascii_lowercase
|
|
return ''.join(random.choice(letters) for i in range(length))
|
|
|
|
|
|
def generate_password(length):
|
|
characters = string.ascii_letters + string.digits + string.punctuation
|
|
return ''.join(random.choice(characters) for i in range(length))
|