mirror of
https://github.com/projecthorus/sondehub-infra.git
synced 2024-12-19 21:27:55 +00:00
Add PS-15 test
This commit is contained in:
parent
c7fb8bab3f
commit
c9af79fa0b
@ -233,5 +233,16 @@ class TestIngestion(unittest.TestCase):
|
||||
self.assertEqual(output["body"], "^v^ telm logged")
|
||||
self.assertEqual(output["statusCode"], 200)
|
||||
|
||||
def test_ps15_payload(self):
|
||||
payload = copy.deepcopy(example_body)
|
||||
payload[0]["datetime"] = datetime.datetime.now().isoformat()
|
||||
payload[0]["type"] = "PS-15"
|
||||
payload[0]["subtype"] = "PS-15"
|
||||
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…
Reference in New Issue
Block a user