Coverage for /opt/conda/envs/apienv/lib/python3.10/site-packages/daiquiri/core/schema/login.py: 100%

11 statements  

« prev     ^ index     » next       coverage.py v7.6.5, created at 2024-11-15 02:12 +0000

1#!/usr/bin/env python 

2# -*- coding: utf-8 -*- 

3from marshmallow import Schema, fields 

4 

5from daiquiri.core.schema.validators import ValidatedRegexp 

6from daiquiri.core.schema.session import SessionListSchema 

7 

8import logging 

9 

10logger = logging.getLogger(__name__) 

11 

12 

13class LoginSchema(Schema): 

14 username = ValidatedRegexp("word", required=True) 

15 password = fields.Str(required=True) 

16 client = ValidatedRegexp("word-dash") 

17 

18 

19class LoginResponseSchema(SessionListSchema): 

20 token = fields.Str()