@@ -132,33 +132,33 @@ def test_determine_reboot_cause_hardware(self):
132
132
assert additional_reboot_info == "N/A"
133
133
134
134
def test_determine_reboot_cause_software (self ):
135
- with mock .patch ("determine_reboot_cause.determine_reboot_cause. find_proc_cmdline_reboot_cause" , return_value = None ):
136
- with mock .patch ("determine_reboot_cause.determine_reboot_cause. find_software_reboot_cause" , return_value = EXPECTED_FIND_SOFTWARE_REBOOT_CAUSE_USER ):
137
- with mock .patch ("determine_reboot_cause.determine_reboot_cause. find_hardware_reboot_cause" , return_value = EXPECTED_NON_HARDWARE_REBOOT_CAUSE ):
135
+ with mock .patch ("determine_reboot_cause.find_proc_cmdline_reboot_cause" , return_value = None ):
136
+ with mock .patch ("determine_reboot_cause.find_software_reboot_cause" , return_value = EXPECTED_FIND_SOFTWARE_REBOOT_CAUSE_USER ):
137
+ with mock .patch ("determine_reboot_cause.find_hardware_reboot_cause" , return_value = EXPECTED_NON_HARDWARE_REBOOT_CAUSE ):
138
138
previous_reboot_cause , additional_info = determine_reboot_cause .determine_reboot_cause ()
139
139
assert previous_reboot_cause == EXPECTED_FIND_SOFTWARE_REBOOT_CAUSE_USER
140
140
assert additional_info == "N/A"
141
141
142
142
def test_determine_reboot_cause_cmdline_software (self ):
143
- with mock .patch ("determine_reboot_cause.determine_reboot_cause. find_proc_cmdline_reboot_cause" , return_value = EXPECTED_PARSE_WARMFAST_REBOOT_FROM_PROC_CMDLINE ):
144
- with mock .patch ("determine_reboot_cause.determine_reboot_cause. find_software_reboot_cause" , return_value = EXPECTED_FIND_SOFTWARE_REBOOT_CAUSE_USER ):
145
- with mock .patch ("determine_reboot_cause.determine_reboot_cause. find_hardware_reboot_cause" , return_value = EXPECTED_NON_HARDWARE_REBOOT_CAUSE ):
143
+ with mock .patch ("determine_reboot_cause.find_proc_cmdline_reboot_cause" , return_value = EXPECTED_PARSE_WARMFAST_REBOOT_FROM_PROC_CMDLINE ):
144
+ with mock .patch ("determine_reboot_cause.find_software_reboot_cause" , return_value = EXPECTED_FIND_SOFTWARE_REBOOT_CAUSE_USER ):
145
+ with mock .patch ("determine_reboot_cause.find_hardware_reboot_cause" , return_value = EXPECTED_NON_HARDWARE_REBOOT_CAUSE ):
146
146
previous_reboot_cause , additional_info = determine_reboot_cause .determine_reboot_cause ()
147
147
assert previous_reboot_cause == EXPECTED_FIND_SOFTWARE_REBOOT_CAUSE_USER
148
148
assert additional_info == "N/A"
149
149
150
150
def test_determine_reboot_cause_cmdline_no_software (self ):
151
- with mock .patch ("determine_reboot_cause.determine_reboot_cause. find_proc_cmdline_reboot_cause" , return_value = EXPECTED_PARSE_WARMFAST_REBOOT_FROM_PROC_CMDLINE ):
152
- with mock .patch ("determine_reboot_cause.determine_reboot_cause. find_software_reboot_cause" , return_value = REBOOT_CAUSE_UNKNOWN ):
153
- with mock .patch ("determine_reboot_cause.determine_reboot_cause. find_hardware_reboot_cause" , return_value = EXPECTED_NON_HARDWARE_REBOOT_CAUSE ):
151
+ with mock .patch ("determine_reboot_cause.find_proc_cmdline_reboot_cause" , return_value = EXPECTED_PARSE_WARMFAST_REBOOT_FROM_PROC_CMDLINE ):
152
+ with mock .patch ("determine_reboot_cause.find_software_reboot_cause" , return_value = REBOOT_CAUSE_UNKNOWN ):
153
+ with mock .patch ("determine_reboot_cause.find_hardware_reboot_cause" , return_value = EXPECTED_NON_HARDWARE_REBOOT_CAUSE ):
154
154
previous_reboot_cause , additional_info = determine_reboot_cause .determine_reboot_cause ()
155
155
assert previous_reboot_cause == EXPECTED_PARSE_WARMFAST_REBOOT_FROM_PROC_CMDLINE
156
156
assert additional_info == "N/A"
157
157
158
158
def test_determine_reboot_cause_cmdline_hardware (self ):
159
- with mock .patch ("determine_reboot_cause.determine_reboot_cause. find_proc_cmdline_reboot_cause" , return_value = EXPECTED_PARSE_WARMFAST_REBOOT_FROM_PROC_CMDLINE ):
160
- with mock .patch ("determine_reboot_cause.determine_reboot_cause. find_software_reboot_cause" , return_value = REBOOT_CAUSE_UNKNOWN ):
161
- with mock .patch ("determine_reboot_cause.determine_reboot_cause. find_hardware_reboot_cause" , return_value = EXPECTED_HARDWARE_REBOOT_CAUSE ):
159
+ with mock .patch ("determine_reboot_cause.find_proc_cmdline_reboot_cause" , return_value = EXPECTED_PARSE_WARMFAST_REBOOT_FROM_PROC_CMDLINE ):
160
+ with mock .patch ("determine_reboot_cause.find_software_reboot_cause" , return_value = REBOOT_CAUSE_UNKNOWN ):
161
+ with mock .patch ("determine_reboot_cause.find_hardware_reboot_cause" , return_value = EXPECTED_HARDWARE_REBOOT_CAUSE ):
162
162
previous_reboot_cause , additional_info = determine_reboot_cause .determine_reboot_cause ()
163
163
assert previous_reboot_cause == EXPECTED_HARDWARE_REBOOT_CAUSE
164
164
assert additional_info == EXPECTED_PARSE_WARMFAST_REBOOT_FROM_PROC_CMDLINE
0 commit comments