Skip to content

Commit

Permalink
Include dev/oci_env_integration in tdd checks. (#1821)
Browse files Browse the repository at this point in the history
* Include dev/oci_env_integration in tdd checks.
* Lint fixes.

No-Issue

Signed-off-by: James Tanner <[email protected]>
  • Loading branch information
jctanner authored Jul 31, 2023
1 parent 2ca639e commit 0a9fab1
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 8 deletions.
3 changes: 2 additions & 1 deletion dev/common/tdd.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ def verify_test_files_changed(changed_files):

# places where test code goes
test_paths = [
'galaxy_ng/tests'
'galaxy_ng/tests',
'dev/oci_env_integration',
]

def is_app_path(fn):
Expand Down
6 changes: 3 additions & 3 deletions galaxy_ng/app/access_control/access_policy.py
Original file line number Diff line number Diff line change
Expand Up @@ -688,14 +688,14 @@ def has_namespace_obj_perms(self, request, view, action, permission):
if request.user.has_perm(permission):
return True
obj = view.get_object()
if type(obj) == container_models.ContainerDistribution:
if type(obj) is container_models.ContainerDistribution:
namespace = obj.namespace
return request.user.has_perm(permission, namespace)
elif type(obj) == container_models.ContainerPushRepository:
elif type(obj) is container_models.ContainerPushRepository:
for dist in obj.distributions.all():
if request.user.has_perm(permission, dist.cast().namespace):
return True
elif type(obj) == container_models.ContainerPushRepositoryVersion:
elif type(obj) is container_models.ContainerPushRepositoryVersion:
for dist in obj.repository.distributions.all():
if request.user.has_perm(permission, dist.cast().namespace):
return True
Expand Down
2 changes: 1 addition & 1 deletion galaxy_ng/app/api/ui/views/index_execution_environments.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def post(self, request: Request, *args, **kwargs) -> Response:
serializable_meta = {}
for key in self.request.META:
val = self.request.META[key]
if type(val) == str:
if type(val) is str:
serializable_meta[key] = val

request_data = {
Expand Down
7 changes: 5 additions & 2 deletions galaxy_ng/tests/integration/api/test_sync_stage.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,11 @@
from ..conftest import get_galaxy_client, get_ansible_config, get_hub_version
from ..utils import wait_for_task, get_client, set_certification
from orionutils.generator import build_collection
from ..utils.iqe_utils import is_sync_testing, get_all_collections,\
retrieve_collection
from ..utils.iqe_utils import (
is_sync_testing,
get_all_collections,
retrieve_collection,
)
from ..utils.tools import generate_random_artifact_version, uuid4

pytestmark = pytest.mark.qa # noqa: F821
Expand Down
2 changes: 1 addition & 1 deletion galaxy_ng/tests/integration/api/test_v3_plugin_paths.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ def test_api_v3_plugin_execution_environments_repositories(ansible_config, local
assert ns_name == ns_detail_resp['name']

# assert pulp_labels dictionary is in response
assert type(repository_resp['pulp']['repository']['pulp_labels']) == dict
assert type(repository_resp['pulp']['repository']['pulp_labels']) is dict

# delete the repository
delete_repository_resp = api_client(
Expand Down

0 comments on commit 0a9fab1

Please sign in to comment.