File: utils.py

package info (click to toggle)
python-pytest-djangoapp 1.2.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 396 kB
  • sloc: python: 1,116; makefile: 114; sh: 6
file content (16 lines) | stat: -rw-r--r-- 363 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
from time import time

import pytest

from ..configuration import Configuration


def get_stamp() -> str:
    """Returns current timestamp as a string."""
    return f'{time()}'


@pytest.fixture(scope='session')
def conf_app_name() -> str:
    """Returns your application name (deduced or provided)."""
    return Configuration.get_dict()[Configuration.KEY_APP]