From 47278cc559d32f117b09b86b7d67a80dd0066901 Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Thu, 23 Feb 2017 13:48:06 -0500 Subject: [PATCH] Cleanup test fixtures --- data/users/test/test_teamsync.py | 10 ++++------ endpoints/api/test/test_security.py | 2 +- endpoints/api/test/test_team.py | 2 +- endpoints/oauth/test/test_login.py | 6 ++---- 4 files changed, 8 insertions(+), 12 deletions(-) diff --git a/data/users/test/test_teamsync.py b/data/users/test/test_teamsync.py index ffbb96b72..a3172f010 100644 --- a/data/users/test/test_teamsync.py +++ b/data/users/test/test_teamsync.py @@ -1,15 +1,13 @@ -import pytest - from datetime import timedelta -from mock import patch + +import pytest from data import model, database from data.users.federated import FederatedUsers, UserInformation from data.users.teamsync import sync_team, sync_teams_to_groups -from endpoints.test.fixtures import app, appconfig, database_uri, init_db_path, sqlitedb_file -from util.names import parse_robot_username - +from test.fixtures import app, appconfig, database_uri, init_db_path, sqlitedb_file from test.test_ldap import mock_ldap +from util.names import parse_robot_username _FAKE_AUTH = 'fake' diff --git a/endpoints/api/test/test_security.py b/endpoints/api/test/test_security.py index dafd9fd0c..1ae2c31cc 100644 --- a/endpoints/api/test/test_security.py +++ b/endpoints/api/test/test_security.py @@ -5,7 +5,7 @@ from endpoints.api.team import OrganizationTeamSyncing from endpoints.api.test.shared import client_with_identity, conduct_api_call from endpoints.api.superuser import SuperUserRepositoryBuildLogs, SuperUserRepositoryBuildResource from endpoints.api.superuser import SuperUserRepositoryBuildStatus -from endpoints.test.fixtures import app, appconfig, database_uri, init_db_path, sqlitedb_file +from test.fixtures import app, appconfig, database_uri, init_db_path, sqlitedb_file TEAM_PARAMS = {'orgname': 'buynlarge', 'teamname': 'owners'} BUILD_PARAMS = {'build_uuid': 'test-1234'} diff --git a/endpoints/api/test/test_team.py b/endpoints/api/test/test_team.py index 36a4d95a1..4dfa98b7f 100644 --- a/endpoints/api/test/test_team.py +++ b/endpoints/api/test/test_team.py @@ -7,7 +7,7 @@ from endpoints.api import api from endpoints.api.test.shared import client_with_identity, conduct_api_call from endpoints.api.team import OrganizationTeamSyncing, TeamMemberList from endpoints.api.organization import Organization -from endpoints.test.fixtures import app, appconfig, database_uri, init_db_path, sqlitedb_file +from test.fixtures import app, appconfig, database_uri, init_db_path, sqlitedb_file from test.test_ldap import mock_ldap SYNCED_TEAM_PARAMS = {'orgname': 'sellnsmall', 'teamname': 'synced'} diff --git a/endpoints/oauth/test/test_login.py b/endpoints/oauth/test/test_login.py index 04b510aef..f081f84b1 100644 --- a/endpoints/oauth/test/test_login.py +++ b/endpoints/oauth/test/test_login.py @@ -1,11 +1,9 @@ import pytest -from endpoints.oauth.login import _conduct_oauth_login - -from oauth.services.github import GithubOAuthService - from data import model, database from data.users import get_users_handler, DatabaseUsers +from endpoints.oauth.login import _conduct_oauth_login +from oauth.services.github import GithubOAuthService from test.fixtures import app, appconfig, database_uri, init_db_path, sqlitedb_file from test.test_ldap import mock_ldap