yhttp-dbmanager 3.0.0__tar.gz → 3.0.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.
- {yhttp_dbmanager-3.0.0 → yhttp_dbmanager-3.0.2}/PKG-INFO +9 -4
- {yhttp_dbmanager-3.0.0 → yhttp_dbmanager-3.0.2}/README.md +7 -2
- {yhttp_dbmanager-3.0.0 → yhttp_dbmanager-3.0.2}/setup.py +7 -3
- {yhttp_dbmanager-3.0.0 → yhttp_dbmanager-3.0.2}/tests/test_cli.py +12 -3
- yhttp_dbmanager-3.0.2/tests/test_dbmanager.py +22 -0
- {yhttp_dbmanager-3.0.0 → yhttp_dbmanager-3.0.2}/tests/test_install.py +3 -3
- {yhttp_dbmanager-3.0.0 → yhttp_dbmanager-3.0.2}/yhttp/ext/dbmanager/__init__.py +1 -1
- {yhttp_dbmanager-3.0.0 → yhttp_dbmanager-3.0.2}/yhttp_dbmanager.egg-info/PKG-INFO +9 -4
- yhttp_dbmanager-3.0.2/yhttp_dbmanager.egg-info/requires.txt +2 -0
- yhttp_dbmanager-3.0.0/tests/test_dbmanager.py +0 -28
- yhttp_dbmanager-3.0.0/yhttp_dbmanager.egg-info/requires.txt +0 -2
- {yhttp_dbmanager-3.0.0 → yhttp_dbmanager-3.0.2}/LICENSE +0 -0
- {yhttp_dbmanager-3.0.0 → yhttp_dbmanager-3.0.2}/setup.cfg +0 -0
- {yhttp_dbmanager-3.0.0 → yhttp_dbmanager-3.0.2}/tests/test_dburi.py +0 -0
- {yhttp_dbmanager-3.0.0 → yhttp_dbmanager-3.0.2}/yhttp/ext/dbmanager/cli.py +0 -0
- {yhttp_dbmanager-3.0.0 → yhttp_dbmanager-3.0.2}/yhttp/ext/dbmanager/dbmanager.py +0 -0
- {yhttp_dbmanager-3.0.0 → yhttp_dbmanager-3.0.2}/yhttp/ext/dbmanager/install.py +0 -0
- {yhttp_dbmanager-3.0.0 → yhttp_dbmanager-3.0.2}/yhttp/ext/dbmanager/uri.py +0 -0
- {yhttp_dbmanager-3.0.0 → yhttp_dbmanager-3.0.2}/yhttp_dbmanager.egg-info/SOURCES.txt +0 -0
- {yhttp_dbmanager-3.0.0 → yhttp_dbmanager-3.0.2}/yhttp_dbmanager.egg-info/dependency_links.txt +0 -0
- {yhttp_dbmanager-3.0.0 → yhttp_dbmanager-3.0.2}/yhttp_dbmanager.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: yhttp-dbmanager
|
|
3
|
-
Version: 3.0.
|
|
3
|
+
Version: 3.0.2
|
|
4
4
|
Summary: Database manager command line interface and API for yhttp.
|
|
5
5
|
Home-page: http://github.com/yhttp/yhttp-dbmanager
|
|
6
6
|
Author: Vahid Mardani
|
|
@@ -22,7 +22,7 @@ Classifier: Topic :: Software Development :: Libraries
|
|
|
22
22
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
23
23
|
Description-Content-Type: text/markdown
|
|
24
24
|
License-File: LICENSE
|
|
25
|
-
Requires-Dist: yhttp<
|
|
25
|
+
Requires-Dist: yhttp<6,>=5
|
|
26
26
|
Requires-Dist: psycopg2
|
|
27
27
|
|
|
28
28
|
# yhttp-dbmanager
|
|
@@ -82,12 +82,17 @@ make test
|
|
|
82
82
|
|
|
83
83
|
Execute specific test(s) using wildcard:
|
|
84
84
|
```bash
|
|
85
|
-
make test
|
|
85
|
+
make test F=tests/test_db*
|
|
86
|
+
make test F=tests/test_form.py::test_querystringform
|
|
86
87
|
```
|
|
87
88
|
|
|
88
|
-
|
|
89
|
+
*refer to* [pytest documentation](https://docs.pytest.org/en/7.1.x/how-to/usage.html#how-to-invoke-pytest)
|
|
90
|
+
*for more info about invoking tests.*
|
|
91
|
+
|
|
92
|
+
Execute tests and report coverage result:
|
|
89
93
|
```bash
|
|
90
94
|
make cover
|
|
95
|
+
make cover F=tests/test_static.py
|
|
91
96
|
make cover-html
|
|
92
97
|
```
|
|
93
98
|
|
|
@@ -55,12 +55,17 @@ make test
|
|
|
55
55
|
|
|
56
56
|
Execute specific test(s) using wildcard:
|
|
57
57
|
```bash
|
|
58
|
-
make test
|
|
58
|
+
make test F=tests/test_db*
|
|
59
|
+
make test F=tests/test_form.py::test_querystringform
|
|
59
60
|
```
|
|
60
61
|
|
|
61
|
-
|
|
62
|
+
*refer to* [pytest documentation](https://docs.pytest.org/en/7.1.x/how-to/usage.html#how-to-invoke-pytest)
|
|
63
|
+
*for more info about invoking tests.*
|
|
64
|
+
|
|
65
|
+
Execute tests and report coverage result:
|
|
62
66
|
```bash
|
|
63
67
|
make cover
|
|
68
|
+
make cover F=tests/test_static.py
|
|
64
69
|
make cover-html
|
|
65
70
|
```
|
|
66
71
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import os.path
|
|
2
2
|
import re
|
|
3
3
|
|
|
4
|
-
from setuptools import setup
|
|
4
|
+
from setuptools import setup, find_namespace_packages
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
# reading package's version (same way sqlalchemy does)
|
|
@@ -18,7 +18,7 @@ with open(
|
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
dependencies = [
|
|
21
|
-
'yhttp >=
|
|
21
|
+
'yhttp >= 5, < 6',
|
|
22
22
|
'psycopg2',
|
|
23
23
|
]
|
|
24
24
|
|
|
@@ -33,7 +33,11 @@ setup(
|
|
|
33
33
|
long_description=open('README.md').read(),
|
|
34
34
|
long_description_content_type='text/markdown', # This is important!
|
|
35
35
|
install_requires=dependencies,
|
|
36
|
-
packages=
|
|
36
|
+
packages=find_namespace_packages(
|
|
37
|
+
where='./',
|
|
38
|
+
include=['yhttp.ext.dbmanager'],
|
|
39
|
+
exclude=['tests']
|
|
40
|
+
),
|
|
37
41
|
license='MIT',
|
|
38
42
|
classifiers=[
|
|
39
43
|
'Environment :: Console',
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
import os
|
|
2
|
+
|
|
1
3
|
from bddcli import Given, Application as CLIApplication, status, stderr, \
|
|
2
4
|
when, stdout
|
|
3
5
|
import easycli
|
|
4
|
-
from yhttp import Application
|
|
6
|
+
from yhttp.core import Application
|
|
7
|
+
|
|
5
8
|
from yhttp.ext.dbmanager import install
|
|
6
9
|
|
|
7
10
|
|
|
@@ -20,10 +23,16 @@ db:
|
|
|
20
23
|
install(app, cliarguments=[Bar])
|
|
21
24
|
|
|
22
25
|
|
|
23
|
-
def test_applicationcli():
|
|
26
|
+
def test_applicationcli(cicd):
|
|
24
27
|
app.ready()
|
|
25
28
|
cliapp = CLIApplication('example', 'tests.test_cli:app.climain')
|
|
26
|
-
|
|
29
|
+
env = os.environ.copy()
|
|
30
|
+
if cicd:
|
|
31
|
+
env.setdefault('YHTTP_DB_DEFAULT_HOST', 'localhost')
|
|
32
|
+
env.setdefault('YHTTP_DB_DEFAULT_ADMINUSER', 'postgres')
|
|
33
|
+
env.setdefault('YHTTP_DB_DEFAULT_ADMINPASS', 'postgres')
|
|
34
|
+
|
|
35
|
+
with Given(cliapp, 'db', environ=env):
|
|
27
36
|
assert stderr == ''
|
|
28
37
|
assert status == 0
|
|
29
38
|
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
DBNAME = 'yhttp-postgesql-testing'
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
def test_dbmanager(dbmanager):
|
|
5
|
+
# Cleanup
|
|
6
|
+
dbmanager.dropifexists(DBNAME)
|
|
7
|
+
|
|
8
|
+
assert dbmanager.exists('postgres')
|
|
9
|
+
assert not dbmanager.exists(DBNAME)
|
|
10
|
+
|
|
11
|
+
dbmanager.create(DBNAME)
|
|
12
|
+
assert dbmanager.exists(DBNAME)
|
|
13
|
+
|
|
14
|
+
dbmanager.create(DBNAME, dropifexists=True)
|
|
15
|
+
assert dbmanager.exists(DBNAME)
|
|
16
|
+
|
|
17
|
+
dbmanager.drop(DBNAME)
|
|
18
|
+
assert not dbmanager.exists(DBNAME)
|
|
19
|
+
|
|
20
|
+
dbmanager.create(DBNAME)
|
|
21
|
+
dbmanager.dropifexists(DBNAME)
|
|
22
|
+
assert not dbmanager.exists(DBNAME)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: yhttp-dbmanager
|
|
3
|
-
Version: 3.0.
|
|
3
|
+
Version: 3.0.2
|
|
4
4
|
Summary: Database manager command line interface and API for yhttp.
|
|
5
5
|
Home-page: http://github.com/yhttp/yhttp-dbmanager
|
|
6
6
|
Author: Vahid Mardani
|
|
@@ -22,7 +22,7 @@ Classifier: Topic :: Software Development :: Libraries
|
|
|
22
22
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
23
23
|
Description-Content-Type: text/markdown
|
|
24
24
|
License-File: LICENSE
|
|
25
|
-
Requires-Dist: yhttp<
|
|
25
|
+
Requires-Dist: yhttp<6,>=5
|
|
26
26
|
Requires-Dist: psycopg2
|
|
27
27
|
|
|
28
28
|
# yhttp-dbmanager
|
|
@@ -82,12 +82,17 @@ make test
|
|
|
82
82
|
|
|
83
83
|
Execute specific test(s) using wildcard:
|
|
84
84
|
```bash
|
|
85
|
-
make test
|
|
85
|
+
make test F=tests/test_db*
|
|
86
|
+
make test F=tests/test_form.py::test_querystringform
|
|
86
87
|
```
|
|
87
88
|
|
|
88
|
-
|
|
89
|
+
*refer to* [pytest documentation](https://docs.pytest.org/en/7.1.x/how-to/usage.html#how-to-invoke-pytest)
|
|
90
|
+
*for more info about invoking tests.*
|
|
91
|
+
|
|
92
|
+
Execute tests and report coverage result:
|
|
89
93
|
```bash
|
|
90
94
|
make cover
|
|
95
|
+
make cover F=tests/test_static.py
|
|
91
96
|
make cover-html
|
|
92
97
|
```
|
|
93
98
|
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
from yhttp.ext.dbmanager import PostgresqlManager
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
DBNAME = 'yhttp-postgesql-testing'
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
def test_dbmanager():
|
|
8
|
-
# Instance with postgres identity framework.
|
|
9
|
-
dbm = PostgresqlManager()
|
|
10
|
-
|
|
11
|
-
# Cleanup
|
|
12
|
-
dbm.dropifexists(DBNAME)
|
|
13
|
-
|
|
14
|
-
assert dbm.exists('postgres')
|
|
15
|
-
assert not dbm.exists(DBNAME)
|
|
16
|
-
|
|
17
|
-
dbm.create(DBNAME)
|
|
18
|
-
assert dbm.exists(DBNAME)
|
|
19
|
-
|
|
20
|
-
dbm.create(DBNAME, dropifexists=True)
|
|
21
|
-
assert dbm.exists(DBNAME)
|
|
22
|
-
|
|
23
|
-
dbm.drop(DBNAME)
|
|
24
|
-
assert not dbm.exists(DBNAME)
|
|
25
|
-
|
|
26
|
-
dbm.create(DBNAME)
|
|
27
|
-
dbm.dropifexists(DBNAME)
|
|
28
|
-
assert not dbm.exists(DBNAME)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{yhttp_dbmanager-3.0.0 → yhttp_dbmanager-3.0.2}/yhttp_dbmanager.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|