Skip to content

fix: migrate to unittest.assertEqual #6332

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions st2common/tests/unit/test_param_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def test_process_jinja_exception(self):
name = "a1"
value = {"test": "http://someurl?value={{a"}
param_utils._process(G, name, value)
self.assertEquals(G.nodes.get(name, {}).get("value"), value)
self.assertEqual(G.nodes.get(name, {}).get("value"), value)

def test_process_jinja_template(self):

Expand All @@ -76,7 +76,7 @@ def test_process_jinja_template(self):
name = "a1"
value = "http://someurl?value={{a}}"
param_utils._process(G, name, value)
self.assertEquals(G.nodes.get(name, {}).get("template"), value)
self.assertEqual(G.nodes.get(name, {}).get("template"), value)

def test_get_finalized_params(self):
params = {
Expand Down Expand Up @@ -243,7 +243,7 @@ def test_get_finalized_params_with_cast(self):
self.assertEqual(r_runner_params, {"r1": 1, "r2": 1})
self.assertEqual(r_action_params, {"a1": True, "a2": True, "a3": "noob"})

def test_get_finalized_params_with_cast_overriden(self):
def test_get_finalized_params_with_cast_overridden(self):
params = {
"r1": "{{r2}}",
"r2": 1,
Expand Down Expand Up @@ -674,7 +674,7 @@ def _get_liveaction_model(self, params, with_config_context=False):
return liveaction_db

def test_get_value_from_datastore_through_render_live_params(self):
# Register datastore value to be refered by this test-case
# Register datastore value to be referred by this test-case
register_kwargs = [
{"name": "test_key", "value": "foo"},
{"name": "user1:test_key", "value": "bar", "scope": FULL_USER_SCOPE},
Expand Down
2 changes: 1 addition & 1 deletion st2common/tests/unit/test_stream_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,4 @@ def test_generator(self, mock_queue, get_action_ref_for_body):
)
events = EVENTS.append("")
for index, val in enumerate(app_iter):
self.assertEquals(val, events[index])
self.assertEqual(val, events[index])
Loading