Skip to content

Commit

Permalink
Use new mock_me fixture to avoid DB call with me method
Browse files Browse the repository at this point in the history
  • Loading branch information
AlanCoding committed Mar 22, 2022
1 parent bb5df58 commit 7198489
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions awx/main/tests/unit/tasks/test_runner_callback.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from django.utils.translation import ugettext_lazy as _


def test_delay_update():
def test_delay_update(mock_me):
rc = RunnerCallback()
rc.delay_update(foo='bar')
assert rc.extra_update_fields == {'foo': 'bar'}
Expand All @@ -13,15 +13,15 @@ def test_delay_update():
assert rc.get_extra_update_fields() == {'foo': 'foobar', 'bar': 'foo', 'emitted_events': 0}


def test_delay_update_skip_if_set():
def test_delay_update_skip_if_set(mock_me):
rc = RunnerCallback()
rc.delay_update(foo='bar', skip_if_already_set=True)
assert rc.extra_update_fields == {'foo': 'bar'}
rc.delay_update(foo='foobar', skip_if_already_set=True)
assert rc.extra_update_fields == {'foo': 'bar'}


def test_delay_update_failure_fields():
def test_delay_update_failure_fields(mock_me):
rc = RunnerCallback()
rc.delay_update(job_explanation='1')
rc.delay_update(job_explanation=_('2'))
Expand Down

0 comments on commit 7198489

Please sign in to comment.