mirror of
https://github.com/ansible/awx.git
synced 2026-05-22 08:17:39 -02:30
Merge pull request #5396 from AlanCoding/signal_intelligence
Avoid a particular kind of nonsense activity stream entry
This commit is contained in:
@@ -56,15 +56,6 @@ def clear_cache():
|
||||
cache.clear()
|
||||
|
||||
|
||||
@pytest.fixture(scope="session", autouse=False)
|
||||
def disable_signals():
|
||||
'''
|
||||
Disable all django model signals.
|
||||
'''
|
||||
mocked = mock.patch('django.dispatch.Signal.send', autospec=True)
|
||||
mocked.start()
|
||||
|
||||
|
||||
@pytest.fixture(scope="session", autouse=True)
|
||||
def celery_memory_broker():
|
||||
'''
|
||||
|
||||
13
awx/main/tests/functional/models/test_activity_stream.py
Normal file
13
awx/main/tests/functional/models/test_activity_stream.py
Normal file
@@ -0,0 +1,13 @@
|
||||
import pytest
|
||||
|
||||
# AWX models
|
||||
from awx.main.models.organization import Organization
|
||||
from awx.main.models import ActivityStream
|
||||
|
||||
|
||||
|
||||
@pytest.mark.django_db
|
||||
def test_activity_stream_create_entries():
|
||||
Organization.objects.create(name='test-organization2')
|
||||
assert ActivityStream.objects.filter(organization__isnull=False).count() == 1
|
||||
|
||||
Reference in New Issue
Block a user