Skip to content

Commit ee56f20

Browse files
tseavercojenco
authored andcommitted
tests: move system tests into a package (googleapis#51)
Prep for factoring out e.g. signing tests into separate modules. Port of googleapis/google-cloud-python#9777 into new reposiory.
1 parent de12cf8 commit ee56f20

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

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):
@@ -451,11 +453,10 @@ def test_bucket_get_blob_with_user_project(self):
451453

452454
class TestStorageFiles(unittest.TestCase):
453455

454-
DIRNAME = os.path.realpath(os.path.dirname(__file__))
455456
FILES = {
456-
"logo": {"path": DIRNAME + "/data/CloudPlatform_128px_Retina.png"},
457-
"big": {"path": DIRNAME + "/data/five-point-one-mb-file.zip"},
458-
"simple": {"path": DIRNAME + "/data/simple.txt"},
457+
"logo": {"path": DATA_DIRNAME + "/CloudPlatform_128px_Retina.png"},
458+
"big": {"path": DATA_DIRNAME + "/five-point-one-mb-file.zip"},
459+
"simple": {"path": DATA_DIRNAME + "/simple.txt"},
459460
}
460461

461462
@classmethod

0 commit comments

Comments
 (0)