diff --git a/awx/api/test_api.py b/awx/api/test_api.py deleted file mode 100644 index d11a45e088..0000000000 --- a/awx/api/test_api.py +++ /dev/null @@ -1,4 +0,0 @@ -# Copyright (c) 2016 Ansible, Inc. -# All Rights Reserved. - -from awx.api.tests import * # noqa diff --git a/awx/fact/test_fact.py b/awx/fact/test_fact.py deleted file mode 100644 index 43070b2bbe..0000000000 --- a/awx/fact/test_fact.py +++ /dev/null @@ -1,4 +0,0 @@ -# Copyright (c) 2016 Ansible, Inc. -# All Rights Reserved. - -from awx.fact.tests import * # noqa diff --git a/awx/main/managers.py b/awx/main/managers.py index 047f2999ca..355f616dac 100644 --- a/awx/main/managers.py +++ b/awx/main/managers.py @@ -12,11 +12,10 @@ class HostManager(models.Manager): def active_count(self): """Return count of active, unique hosts for licensing.""" - #try: - # return self.filter(active=True, inventory__active=True).distinct('name').count() - #except NotImplementedError: # For unit tests only, SQLite doesn't support distinct('name') - # FIXME-CC - return len(set(self.filter(active=True, inventory__active=True).values_list('name', flat=True))) + try: + return self.filter(active=True, inventory__active=True).order_by('name').distinct('name').count() + except NotImplementedError: # For unit tests only, SQLite doesn't support distinct('name') + return len(set(self.filter(active=True, inventory__active=True).values_list('name', flat=True))) class InstanceManager(models.Manager): """A custom manager class for the Instance model. diff --git a/awx/main/test_main.py b/awx/main/test_main.py deleted file mode 100644 index b74dd89556..0000000000 --- a/awx/main/test_main.py +++ /dev/null @@ -1,4 +0,0 @@ -# Copyright (c) 2015 Ansible, Inc. -# All Rights Reserved. - -from awx.main.tests import * # noqa diff --git a/awx/main/tests/old/activity_stream.py b/awx/main/tests/old/activity_stream.py index 80582d8b6b..9798695954 100644 --- a/awx/main/tests/old/activity_stream.py +++ b/awx/main/tests/old/activity_stream.py @@ -31,7 +31,6 @@ class ActivityStreamTest(BaseTest): self.options(url, expect=200) self.head(url, expect=200) response = self.get(url, expect=200) - print response self.check_pagination_and_size(response, 1, previous=None, next=None) def test_basic_fields(self):