Skip to content

Commit 4e4e810

Browse files
committed
tests: move system tests into a package
Prep for factoring out e.g. signing tests into separate modules. Port of googleapis/google-cloud-python#9777 into new reposiory.
1 parent ff15f19 commit 4e4e810

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed
Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@
4040

4141

4242
USER_PROJECT = os.environ.get("GOOGLE_CLOUD_TESTS_USER_PROJECT")
43+
DIRNAME = os.path.realpath(os.path.dirname(__file__))
44+
DATA_DIRNAME = os.path.abspath(os.path.join(DIRNAME, "..", "data"))
4345

4446

4547
def _bad_copy(bad_request):
@@ -460,11 +462,10 @@ def test_bucket_get_blob_with_user_project(self):
460462

461463
class TestStorageFiles(unittest.TestCase):
462464

463-
DIRNAME = os.path.realpath(os.path.dirname(__file__))
464465
FILES = {
465-
"logo": {"path": DIRNAME + "/data/CloudPlatform_128px_Retina.png"},
466-
"big": {"path": DIRNAME + "/data/five-point-one-mb-file.zip"},
467-
"simple": {"path": DIRNAME + "/data/simple.txt"},
466+
"logo": {"path": DATA_DIRNAME + "/CloudPlatform_128px_Retina.png"},
467+
"big": {"path": DATA_DIRNAME + "/five-point-one-mb-file.zip"},
468+
"simple": {"path": DATA_DIRNAME + "/simple.txt"},
468469
}
469470

470471
@classmethod

0 commit comments

Comments
 (0)