Skip to content

Commit

Permalink
removing test that's covered in the ETL library unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkhamLee committed Mar 8, 2024
1 parent 0c723d3 commit b8be8ac
Showing 1 changed file with 0 additions and 24 deletions.
24 changes: 0 additions & 24 deletions etl_pipelines/openweather_current/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
# will be the source of most of your errors, as opposed to the code itself.
import os
import sys
import json
import unittest
import main
import tracemalloc
Expand Down Expand Up @@ -85,29 +84,6 @@ def test_bad_api_keys(self):
"API call was successful, it should've failed")
self.assertEqual(response, 200, "Slack alert was sent unsuccessfully")

# Testing data validation, this should throw an error if an improper
# data json payload is provided.
def test_data_validation(self):

# define "bad" data payload
bad_data = {
"weather": 5,
"temp": "Gojo",
"feels like": "dancing",
"low": 6.61
}

# load data schema
with open('current_weather.json') as file:
SCHEMA = json.load(file)

# test data validation
code, response = self.etl_utilities.validate_json(bad_data, SCHEMA)

self.assertEqual(code, 1,
"Data validation was unsuccessful")
self.assertEqual(response, 200, "Slack alert was sent unsuccessfully")


if __name__ == '__main__':
unittest.main()

0 comments on commit b8be8ac

Please sign in to comment.