diff --git a/stix2/test/v20/test_datastore_memory.py b/stix2/test/v20/test_datastore_memory.py index 279026c..8bb7e72 100644 --- a/stix2/test/v20/test_datastore_memory.py +++ b/stix2/test/v20/test_datastore_memory.py @@ -148,7 +148,7 @@ def fs_mem_store(request, mem_store): def fin(): # teardown, executed regardless of exception - shutil.rmtree(os.path.dirname(filename)) + shutil.rmtree(os.path.dirname(saved_location)) request.addfinalizer(fin) return saved_location @@ -163,7 +163,7 @@ def fs_mem_store_no_name(request, mem_store): def fin(): # teardown, executed regardless of exception - shutil.rmtree(os.path.dirname(filename)) + shutil.rmtree(os.path.dirname(saved_location)) request.addfinalizer(fin) return saved_location diff --git a/stix2/test/v21/test_datastore_memory.py b/stix2/test/v21/test_datastore_memory.py index 3a76fbc..f919bd3 100644 --- a/stix2/test/v21/test_datastore_memory.py +++ b/stix2/test/v21/test_datastore_memory.py @@ -156,7 +156,7 @@ def fs_mem_store(request, mem_store): def fin(): # teardown, executed regardless of exception - shutil.rmtree(os.path.dirname(filename)) + shutil.rmtree(os.path.dirname(saved_location)) request.addfinalizer(fin) return saved_location @@ -171,7 +171,7 @@ def fs_mem_store_no_name(request, mem_store): def fin(): # teardown, executed regardless of exception - shutil.rmtree(os.path.dirname(filename)) + shutil.rmtree(os.path.dirname(saved_location)) request.addfinalizer(fin) return saved_location