From afd725d5b4bbba869e358f5f78454c6a558716ed Mon Sep 17 00:00:00 2001 From: bvanroll Date: Wed, 24 Mar 2021 09:43:51 +0100 Subject: [PATCH] if you change your config files to use the new dir, don't forget to actually set up the new dir --- {vaultdatabaseengine => src}/__init__.py | 0 {vaultdatabaseengine => src}/__main__.py | 0 test/database.py | 10 +++++----- 3 files changed, 5 insertions(+), 5 deletions(-) rename {vaultdatabaseengine => src}/__init__.py (100%) rename {vaultdatabaseengine => src}/__main__.py (100%) diff --git a/vaultdatabaseengine/__init__.py b/src/__init__.py similarity index 100% rename from vaultdatabaseengine/__init__.py rename to src/__init__.py diff --git a/vaultdatabaseengine/__main__.py b/src/__main__.py similarity index 100% rename from vaultdatabaseengine/__main__.py rename to src/__main__.py diff --git a/test/database.py b/test/database.py index 15c56bf..76b96cc 100644 --- a/test/database.py +++ b/test/database.py @@ -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())