Skip to content

Commit

Permalink
test fixes
Browse files Browse the repository at this point in the history
Signed-off-by: Clemens Vasters <clemens@vasters.com>
  • Loading branch information
clemensv committed Feb 15, 2024
1 parent 6ae69b3 commit c265ccc
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
15 changes: 15 additions & 0 deletions test/test_jsontoavro.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,34 +15,49 @@ def test_convert_address_jsons_to_avro(self):
cwd = getcwd()
jsons_path = path.join(cwd, "test", "jsons", "address.jsons")
avro_path = path.join(cwd, "test", "tmp", "address.avsc")
dir = os.path.dirname(avro_path)
if not os.path.exists(dir):
os.makedirs(dir)

convert_jsons_to_avro(jsons_path, avro_path, "example.com")

def test_convert_movie_jsons_to_avro(self):
cwd = getcwd()
jsons_path = path.join(cwd, "test", "jsons", "movie.jsons")
avro_path = path.join(cwd, "test", "tmp", "movie.avsc")
dir = os.path.dirname(avro_path)
if not os.path.exists(dir):
os.makedirs(dir)

convert_jsons_to_avro(jsons_path, avro_path, "example.com")

def test_convert_person_jsons_to_avro(self):
cwd = getcwd()
jsons_path = path.join(cwd, "test", "jsons", "person.jsons")
avro_path = path.join(cwd, "test", "tmp", "person.avsc")
dir = os.path.dirname(avro_path)
if not os.path.exists(dir):
os.makedirs(dir)

convert_jsons_to_avro(jsons_path, avro_path, "example.com")

def test_convert_employee_jsons_to_avro(self):
cwd = getcwd()
jsons_path = path.join(cwd, "test", "jsons", "employee.jsons")
avro_path = path.join(cwd, "test", "tmp", "employee.avsc")
dir = os.path.dirname(avro_path)
if not os.path.exists(dir):
os.makedirs(dir)

convert_jsons_to_avro(jsons_path, avro_path, "example.com")

def test_convert_azurestorage_jsons_to_avro(self):
cwd = getcwd()
jsons_path = path.join(cwd, "test", "jsons", "azurestorage.jsons")
avro_path = path.join(cwd, "test", "tmp", "azurestorage.avsc")
dir = os.path.dirname(avro_path)
if not os.path.exists(dir):
os.makedirs(dir)

convert_jsons_to_avro(jsons_path, avro_path, "microsoft.azure.storage")

Expand Down
3 changes: 3 additions & 0 deletions test/test_prototoavro.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ def test_convert_proto_to_avro(self):
cwd = getcwd()
proto_path = path.join(cwd, "test", "gtfsrt", "gtfsrt.proto")
avro_path = path.join(cwd, "test", "tmp", "gtfsrt.avsc")
dir = os.path.dirname(avro_path)
if not os.path.exists(dir):
os.makedirs(dir)

convert_proto_to_avro(proto_path, avro_path)

Expand Down
3 changes: 3 additions & 0 deletions test/test_xsdtoavro.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,8 @@ def test_convert_address_jsons_to_avro(self):
cwd = os.getcwd()
xsd_path = os.path.join(cwd, "test", "xsd", "crmdata.xsd")
avro_path = os.path.join(cwd, "test", "tmp", "crmdata.avsc")
dir = os.path.dirname(avro_path)
if not os.path.exists(dir):
os.makedirs(dir)

convert_xsd_to_avro(xsd_path, avro_path)

0 comments on commit c265ccc

Please sign in to comment.