diff --git a/conftest.py b/conftest.py index 734338a79178..56e5566f05ac 100644 --- a/conftest.py +++ b/conftest.py @@ -125,7 +125,6 @@ def _test_speedups_disable(request, settings, _test_speedups): @pytest.fixture(scope='session') def setup_connections(): connections.create_connection(hosts=['http://localhost:9201']) - connections.create_connection(hosts=['http://127.0.0.1:9201']) connections.create_connection(hosts=['http://192.168.168.167:9201']) diff --git a/osf/metrics/reporters/__init__.py b/osf/metrics/reporters/__init__.py index 44688f1d8da7..aa0297fbef11 100644 --- a/osf/metrics/reporters/__init__.py +++ b/osf/metrics/reporters/__init__.py @@ -10,7 +10,7 @@ from .preprint_count import PreprintCountReporter from .user_count import UserCountReporter from .spam_count import SpamCountReporter -from .institutional_users import InstitutionalUsersReporter +from .institutional_users import InstitutionalUserReporter class AllDailyReporters(enum.Enum): @@ -27,4 +27,4 @@ class AllDailyReporters(enum.Enum): class AllMonthlyReporters(enum.Enum): SPAM_COUNT = SpamCountReporter - INSTITUTION_USERS = InstitutionalUsersReporter + INSTITUTION_USERS = InstitutionalUserReporter diff --git a/osf/metrics/reporters/institutional_users.py b/osf/metrics/reporters/institutional_users.py index 069990a62cb9..6029aabc9607 100644 --- a/osf/metrics/reporters/institutional_users.py +++ b/osf/metrics/reporters/institutional_users.py @@ -1,8 +1,7 @@ -import datetime from django.contrib.contenttypes.models import ContentType from osf import models as osfdb -from osf.metrics.reports import InstitutionalUsersReport +from osf.metrics.reports import InstitutionalUserReport from osf.metrics.utils import YearMonth from website import settings as website_settings from api.caching.utils import storage_usage_cache @@ -11,7 +10,7 @@ from ._base import MonthlyReporter -class InstitutionalUsersReporter(MonthlyReporter): +class InstitutionalUserReporter(MonthlyReporter): def report(self, yearmonth: YearMonth): before_datetime = yearmonth.next_month() institutions = osfdb.Institution.objects.all() @@ -24,7 +23,7 @@ def report(self, yearmonth: YearMonth): def generate_report(self, institution, user, yearmonth, before_datetime): affiliation = user.get_institution_affiliation(institution._id) - report = InstitutionalUsersReport( + report = InstitutionalUserReport( report_yearmonth=yearmonth, institution_id=institution._id, user_id=user._id, diff --git a/osf/metrics/reports.py b/osf/metrics/reports.py index 2a825f526bda..6d04af00e262 100644 --- a/osf/metrics/reports.py +++ b/osf/metrics/reports.py @@ -231,4 +231,4 @@ class InstitutionalUserReport(MonthlyReport): storage_byte_count = metrics.Integer() month_last_login = YearmonthField() account_creation_date = YearmonthField() - orcid_id = metrics.Keyword() \ No newline at end of file + orcid_id = metrics.Keyword()