From b437341ad771730de880167eb4c9a6b67b9dce72 Mon Sep 17 00:00:00 2001 From: Nikki <17799906+nikki-t@users.noreply.github.com> Date: Tue, 11 Jun 2024 12:36:10 -0400 Subject: [PATCH] Fix reference to expected test data file --- tests/unit/test_services.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/unit/test_services.py b/tests/unit/test_services.py index 433d7ee9..14094410 100644 --- a/tests/unit/test_services.py +++ b/tests/unit/test_services.py @@ -1,4 +1,6 @@ import json +import os.path +import pathlib import unittest import earthaccess @@ -34,7 +36,10 @@ def test_services(self): ) actual = query.get(query.hits()) - with open("tests/unit/fixtures/S2004184019-POCLOUD.json") as jf: + expected_file = pathlib.Path( + os.path.dirname(os.path.realpath(__file__)) + ).joinpath("fixtures/S2004184019-POCLOUD.json") + with open(expected_file) as jf: expected = json.load(jf) self.assertTrue(