Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
Simran Mattu committed Sep 18, 2024
1 parent 6663eed commit 759e85e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
8 changes: 6 additions & 2 deletions woudc_data_registry/processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -939,7 +939,8 @@ def check_location(self):
height_numeric = float(height) if height else None
if not height or -50 <= height_numeric <= 5100:
LOGGER.debug('Validated instrument height')
elif not self._add_to_report(326, valueline, lower=-50, upper=5100):
elif not self._add_to_report(
326, valueline, lower=-50, upper=5100):
success = False
except ValueError:
if not self._add_to_report(324, valueline):
Expand Down Expand Up @@ -1147,7 +1148,10 @@ def check_time_series(self):
success = False
else:
if other_date > dg_date:
err_code = 336 if table.startswith('TIMESTAMP') else 337
err_code = (
336 if table.startswith('TIMESTAMP')
else 337
)
if not self._add_to_report(err_code,
line, table=table):
success = False
Expand Down
3 changes: 0 additions & 3 deletions woudc_data_registry/tests/test_report_generation.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,6 @@ def test_uses_error_definition(self):
_, success = op_report.add_message(101)
self.assertFalse(success)


def test_passing_operator_report(self):
"""Test that a passing file is written in the operator report"""

Expand Down Expand Up @@ -938,7 +937,6 @@ def test_email_summary_single_fix(self):
with open(output_path) as output:
lines = output.read().splitlines()
self.assertEqual(len(lines), 8)

self.assertEqual(lines[0], 'MSC (placeholder@mail.com)')
self.assertEqual(lines[1], 'Total files received: 1')
self.assertEqual(lines[2], 'Number of passed files: 0')
Expand Down Expand Up @@ -1147,7 +1145,6 @@ def test_email_summary_multiple_causes(self):
self.assertIn(lines[9], fail_group)
self.assertNotIn('.csv', lines[10])
self.assertIn(lines[11], fail_group)

self.assertEqual(lines[12], 'Summary of Fixes:')
self.assertNotIn('.csv', lines[13])
self.assertIn(lines[14], fix_group)
Expand Down

0 comments on commit 759e85e

Please sign in to comment.