mirror of
https://github.com/bvanroll/python-vault-db.git
synced 2025-08-29 12:02:41 +00:00
Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
3cf1fa2dbd | |||
f960d43543 | |||
35f3e33cfd | |||
afd725d5b4 |
4
setup.py
4
setup.py
@@ -4,7 +4,7 @@ with open("README.md", "r", encoding="utf-8") as fh:
|
||||
long_description = fh.read()
|
||||
|
||||
setuptools.setup(
|
||||
name="VaultDb", # Replace with your own username
|
||||
name="VaultDb",
|
||||
version="0.0.1",
|
||||
version_config=True,
|
||||
setup_requires=['setuptools-git-versioning'],
|
||||
@@ -23,6 +23,6 @@ setuptools.setup(
|
||||
"Operating System :: OS Independent",
|
||||
],
|
||||
package_dir={"": "src"},
|
||||
packages=setuptools.find_packages(where="src"),
|
||||
packages=setuptools.find_packages(where="VaultDb"),
|
||||
python_requires=">=3.6",
|
||||
)
|
||||
|
@@ -2,32 +2,32 @@ import unittest
|
||||
import sys
|
||||
import os
|
||||
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
|
||||
import vaultdatabaseengine
|
||||
import src
|
||||
|
||||
class MyTestCase(unittest.TestCase):
|
||||
def test_psql(self):
|
||||
#TODO exec psql connect
|
||||
print("hi")
|
||||
test = vaultdatabaseengine.Database()
|
||||
test = src.Database()
|
||||
test.check_valid()
|
||||
self.assertEqual(test.valid, False)
|
||||
|
||||
def test_psql_invalid_vault_url(self):
|
||||
#TODO figure out how to fail unit test check
|
||||
try:
|
||||
vaultdatabaseengine.Database(dbname="sdfk", vault_url="localhost", vault_port=8200, token="bla")
|
||||
src.Database(dbname="sdfk", vault_url="localhost", vault_port=8200, token="bla")
|
||||
except:
|
||||
print("did it")
|
||||
return
|
||||
|
||||
def test_psql_invalid_vault_port(self):
|
||||
try:
|
||||
vaultdatabaseengine.Database(dbname="sdfk", vault_url="localhost", vault_port="a", token="bla")
|
||||
src.Database(dbname="sdfk", vault_url="localhost", vault_port="a", token="bla")
|
||||
except:
|
||||
return
|
||||
|
||||
def test_psql_valid(self):
|
||||
print(vaultdatabaseengine.Database(dbname="psql", vault_url="http://localhost", token="s.GoR2nisHPeKU1vOaw9hZ5L7h").get_creds())
|
||||
print(src.Database(dbname="psql", vault_url="http://localhost", token="s.GoR2nisHPeKU1vOaw9hZ5L7h").get_creds())
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user