API - init OAuth server and oauth clients creation

This commit is contained in:
Sam
2022-05-27 13:28:26 +02:00
parent c13e9e0286
commit c6cd7ff67c
19 changed files with 700 additions and 1 deletions

View File

@@ -1,4 +1,5 @@
import json
from random import randint
from typing import Any, Dict, Optional, Tuple
from flask import Flask
@@ -18,10 +19,18 @@ class RandomMixin:
) -> str:
return random_string(length, prefix, suffix)
@staticmethod
def random_domain() -> str:
return random_string(prefix='https://', suffix='com')
@staticmethod
def random_email() -> str:
return random_email()
@staticmethod
def random_int(min_val: int = 0, max_val: int = 999999) -> int:
return randint(min_val, max_val)
class ApiTestCaseMixin(RandomMixin):
@staticmethod