Skip to content

Commit

Permalink
Fix test issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Spredzy committed Mar 24, 2021
1 parent e04e4e8 commit 6d8874d
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 5 deletions.
3 changes: 2 additions & 1 deletion awx/main/analytics/collectors.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import os
import os.path
import platform
import distro

from django.db import connection
from django.db.models import Count
Expand Down Expand Up @@ -43,7 +44,7 @@ def config(since, **kwargs):
return {
'platform': {
'system': platform.system(),
'dist': platform.dist(),
'dist': distro.linux_distribution(),
'release': platform.release(),
'type': install_type,
},
Expand Down
3 changes: 1 addition & 2 deletions awx/main/tests/unit/models/test_ha.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,12 @@
from unittest.mock import Mock

from awx.main.models import (
Job,
InstanceGroup,
)


def T(impact):
j = mock.Mock(Job())
j = mock.Mock(spec_set=['task_impact'])
j.task_impact = impact
return j

Expand Down
3 changes: 1 addition & 2 deletions awx/main/tests/unit/scheduler/test_kubernetes.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import pytest
from unittest import mock
from django.conf import settings

from awx.main.models import (
Expand All @@ -14,7 +13,7 @@

@pytest.fixture
def container_group():
instance_group = mock.Mock(InstanceGroup(name='container-group'))
instance_group = InstanceGroup(name='container-group', id=1)

return instance_group

Expand Down
1 change: 1 addition & 0 deletions requirements/requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ channels
channels-redis>=3.1.0 # https://github.com/django/channels_redis/issues/212
cryptography<3.0.0
daphne
distro
django==2.2.16 # see UPGRADE BLOCKERs
django-auth-ldap
django-cors-headers
Expand Down
2 changes: 2 additions & 0 deletions requirements/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ defusedxml==0.6.0
# social-auth-core
dictdiffer==0.8.1
# via openshift
distro==1.5.0
# via -r /awx_devel/requirements/requirements.in
django-auth-ldap==2.1.0
# via -r /awx_devel/requirements/requirements.in
django-cors-headers==3.2.1
Expand Down

0 comments on commit 6d8874d

Please sign in to comment.