Skip to content

Commit

Permalink
Fix unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
stuartmcalpine committed Jan 26, 2024
1 parent 6ec07fa commit a75eb86
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/dataregistry/DataRegistry.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,18 +59,18 @@ def __init__(
self.db_connection = DbConnection(config_file, schema=schema, verbose=verbose)

# Work out the location of the root directory
root_dir = self._get_root_dir(root_dir, site)
self.root_dir = self._get_root_dir(root_dir, site)

# Create registrar object
self.Registrar = Registrar(
self.db_connection,
root_dir,
self.root_dir,
owner=owner,
owner_type=owner_type,
)

# Create query object
self.Query = Query(self.db_connection, root_dir)
self.Query = Query(self.db_connection, self.root_dir)

def _get_root_dir(self, root_dir, site):
"""
Expand Down
3 changes: 1 addition & 2 deletions tests/unit_tests/test_root_dir.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,4 @@ def test_root_dir_manual(root_dir, site, set_env_var, ans):
if reg.db_connection.dialect != "sqlite":
assert reg.db_connection.schema is not None

assert reg.Registrar._root_dir == ans
assert reg.Query._root_dir == ans
assert reg.root_dir == ans

0 comments on commit a75eb86

Please sign in to comment.