File tree 3 files changed +12
-12
lines changed
3 files changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -78,8 +78,8 @@ def test_start_process_server_error_raises_exception(self):
78
78
with self .assertRaises (Exception ) as exception_ctx :
79
79
self .client .start_process (self .process_key , {"int_var" : "1aa2345" }, self .tenant_id )
80
80
81
- self .assertTrue ( f" { HTTPStatus .INTERNAL_SERVER_ERROR } Server Error: Internal Server Error"
82
- in str (exception_ctx .exception ))
81
+ self .assertEqual ( HTTPStatus .INTERNAL_SERVER_ERROR , exception_ctx . exception . response . status_code )
82
+ self . assertIn ( "Server Error: Internal Server Error" , str (exception_ctx .exception ))
83
83
84
84
@responses .activate
85
85
def test_get_process_instance_success (self ):
@@ -136,8 +136,8 @@ def test_get_process_instance_server_error_raises_exception(self):
136
136
variables = ["intVar_XXX_1" , "strVar_eq_hello" ],
137
137
tenant_ids = [self .tenant_id ])
138
138
139
- self .assertTrue ( f" { HTTPStatus .INTERNAL_SERVER_ERROR } Server Error: Internal Server Error"
140
- in str (exception_ctx .exception ))
139
+ self .assertEqual ( HTTPStatus .INTERNAL_SERVER_ERROR , exception_ctx . exception . response . status_code )
140
+ self . assertIn ( "Server Error: Internal Server Error" , str (exception_ctx .exception ))
141
141
142
142
@patch ('requests.post' )
143
143
def test_correlate_message_with_only_message_name (self , mock_post ):
Original file line number Diff line number Diff line change @@ -78,8 +78,8 @@ def test_auth_basic_start_process_server_error_raises_exception(self):
78
78
with self .assertRaises (Exception ) as exception_ctx :
79
79
self .client .start_process (self .process_key , {"int_var" : "1aa2345" }, self .tenant_id )
80
80
81
- self .assertTrue ( f" { HTTPStatus .INTERNAL_SERVER_ERROR } Server Error: Internal Server Error"
82
- in str (exception_ctx .exception ))
81
+ self .assertEqual ( HTTPStatus .INTERNAL_SERVER_ERROR , exception_ctx . exception . response . status_code )
82
+ self . assertIn ( "Server Error: Internal Server Error" , str (exception_ctx .exception ))
83
83
84
84
@responses .activate
85
85
def test_auth_basic_get_process_instance_success (self ):
@@ -136,8 +136,8 @@ def test_auth_basic_get_process_instance_server_error_raises_exception(self):
136
136
variables = ["intVar_XXX_1" , "strVar_eq_hello" ],
137
137
tenant_ids = [self .tenant_id ])
138
138
139
- self .assertTrue ( f" { HTTPStatus .INTERNAL_SERVER_ERROR } Server Error: Internal Server Error"
140
- in str (exception_ctx .exception ))
139
+ self .assertEqual ( HTTPStatus .INTERNAL_SERVER_ERROR , exception_ctx . exception . response . status_code )
140
+ self . assertIn ( "Server Error: Internal Server Error" , str (exception_ctx .exception ))
141
141
142
142
@patch ('requests.post' )
143
143
def test_auth_basic_correlate_message_with_only_message_name (self , mock_post ):
Original file line number Diff line number Diff line change @@ -81,8 +81,8 @@ def test_auth_basic_start_process_server_error_raises_exception(self):
81
81
with self .assertRaises (Exception ) as exception_ctx :
82
82
self .client .start_process (self .process_key , {"int_var" : "1aa2345" }, self .tenant_id )
83
83
84
- self .assertTrue ( f" { HTTPStatus .INTERNAL_SERVER_ERROR } Server Error: Internal Server Error"
85
- in str (exception_ctx .exception ))
84
+ self .assertEqual ( HTTPStatus .INTERNAL_SERVER_ERROR , exception_ctx . exception . response . status_code )
85
+ self . assertIn ( "Server Error: Internal Server Error" , str (exception_ctx .exception ))
86
86
87
87
@responses .activate
88
88
def test_auth_basic_get_process_instance_success (self ):
@@ -139,8 +139,8 @@ def test_auth_basic_get_process_instance_server_error_raises_exception(self):
139
139
variables = ["intVar_XXX_1" , "strVar_eq_hello" ],
140
140
tenant_ids = [self .tenant_id ])
141
141
142
- self .assertTrue ( f" { HTTPStatus .INTERNAL_SERVER_ERROR } Server Error: Internal Server Error"
143
- in str (exception_ctx .exception ))
142
+ self .assertEqual ( HTTPStatus .INTERNAL_SERVER_ERROR , exception_ctx . exception . response . status_code )
143
+ self . assertIn ( "Server Error: Internal Server Error" , str (exception_ctx .exception ))
144
144
145
145
@patch ('requests.post' )
146
146
def test_auth_basic_correlate_message_with_only_message_name (self , mock_post ):
You can’t perform that action at this time.
0 commit comments