yhttp-dev 3.1.0__tar.gz → 3.1.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: yhttp-dev
3
- Version: 3.1.0
3
+ Version: 3.1.2
4
4
  Summary: yhttp development utilities
5
5
  Home-page: https://github.com/yhttp/yhttp-dev
6
6
  Author: pylover
@@ -0,0 +1 @@
1
+ __version__ = '3.1.2'
@@ -53,7 +53,7 @@ def mockupfs():
53
53
 
54
54
 
55
55
  @pytest.fixture
56
- def freshdb():
56
+ def freshdb(cicd):
57
57
  """ Creates a fresh database for each test.
58
58
 
59
59
  Default configuration is using peer authentication method on
@@ -61,14 +61,14 @@ def freshdb():
61
61
  """
62
62
  from yhttp.ext.dbmanager import PostgresqlManager
63
63
 
64
- host = os.environ.get('YHTTPDEV_DB_HOST', '')
65
- user = os.environ.get('YHTTPDEV_DB_USER', '')
66
- password = os.environ.get('YHTTPDEV_DB_PASS', '')
64
+ host = os.environ.get('YHTTP_DB_DEFAULT_HOST', 'localhost' if cicd else '')
65
+ user = os.environ.get('YHTTP_DB_DEFAULT_USER', 'postgres' if cicd else '')
66
+ pass_ = os.environ.get('YHTTP_DB_DEFAULT_PASS', 'postgres' if cicd else '')
67
67
 
68
68
  dbname = f'freshdb_{datetime.datetime.now():%Y%m%d%H%M%S}'
69
- dbmanager = PostgresqlManager(host, 'postgres', user, password)
69
+ dbmanager = PostgresqlManager(host, 'postgres', user, pass_)
70
70
  dbmanager.create(dbname, dropifexists=True)
71
- freshurl = f'postgres://{user}:{password}@{host}/{dbname}'
71
+ freshurl = f'postgresql://{user}:{pass_}@{host}/{dbname}'
72
72
  yield freshurl
73
73
  dbmanager.dropifexists(dbname)
74
74
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: yhttp-dev
3
- Version: 3.1.0
3
+ Version: 3.1.2
4
4
  Summary: yhttp development utilities
5
5
  Home-page: https://github.com/yhttp/yhttp-dev
6
6
  Author: pylover
@@ -1 +0,0 @@
1
- __version__ = '3.1.0'
File without changes
File without changes
File without changes
File without changes