mirror of
https://github.com/projecthorus/sondehub-infra.git
synced 2025-01-29 15:13:53 +00:00
add missing test
This commit is contained in:
parent
84cc0857b9
commit
4fdf302329
@ -222,5 +222,16 @@ class TestIngestion(unittest.TestCase):
|
||||
self.assertNotIn("temp", sns_call[0])
|
||||
self.assertIn("invalid_temp", sns_call[0])
|
||||
|
||||
def test_dfm_09id_payload(self):
|
||||
payload = copy.deepcopy(example_body)
|
||||
payload[0]["datetime"] = datetime.datetime.now().isoformat()
|
||||
payload[0]["type"] = "DFM"
|
||||
payload[0]["subtype"] = "DFM09"
|
||||
payload[0]["serial"] = "21068595"
|
||||
output = lambda_handler(compress_payload(payload), fakeContext())
|
||||
sns.publish.assert_called()
|
||||
self.assertEqual(output["body"], "^v^ telm logged")
|
||||
self.assertEqual(output["statusCode"], 200)
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
Loading…
x
Reference in New Issue
Block a user