File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change 16
16
17
17
"""Test for SSM messenger."""
18
18
19
+ import pytest
20
+
21
+ import caso .exception
19
22
from caso .messenger import ssm
20
23
21
24
25
+ def test_empty_records_does_nothing (monkeypatch ):
26
+ """Test that empty records do nothing."""
27
+ with monkeypatch .context () as m :
28
+ m .setattr ("caso.utils.makedirs" , lambda x : None )
29
+ messenger = ssm .SSMMessenger ()
30
+
31
+ assert messenger .push ([]) is None
32
+
33
+
34
+ def test_weird_record_raises (monkeypatch ):
35
+ """Test that empty records do nothing."""
36
+ with monkeypatch .context () as m :
37
+ m .setattr ("caso.utils.makedirs" , lambda x : None )
38
+ messenger = ssm .SSMMessenger ()
39
+
40
+ with pytest .raises (caso .exception .CasoError ):
41
+ messenger .push ([None , "gfaga" ])
42
+
43
+
22
44
def test_cloud_records_pushed (monkeypatch , cloud_record_list , expected_entries_cloud ):
23
45
"""Test that cloud records are correctly rendered."""
24
46
You can’t perform that action at this time.
0 commit comments