diff --git a/.github/workflows/tests-integration.yaml b/.github/workflows/tests-integration.yaml index 33df1afb..530a9016 100644 --- a/.github/workflows/tests-integration.yaml +++ b/.github/workflows/tests-integration.yaml @@ -25,7 +25,7 @@ jobs: strategy: max-parallel: 1 matrix: - python-version: ['3.8.14', '3.9.15', '3.10.8', '3.11.8'] + python-version: ['3.8.14', '3.9.15', '3.10.8', '3.11.8', '3.12.5'] toolbox-image-tag: ['1.3.5-0.1.15', '1.5.0-0.1.15', '1.6.0-0.1.15'] steps: - name: Checkout base branch diff --git a/.github/workflows/tests-unit.yml b/.github/workflows/tests-unit.yml index ae7f4872..a76b0bca 100644 --- a/.github/workflows/tests-unit.yml +++ b/.github/workflows/tests-unit.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [ '3.8', '3.9', '3.10', '3.11' ] + python-version: [ '3.8', '3.9', '3.10', '3.11' , '3.12'] steps: - uses: actions/checkout@v3 diff --git a/tests/test_containers/test_kubectl.py b/tests/test_containers/test_kubectl.py index 8435e4ee..023bdba5 100644 --- a/tests/test_containers/test_kubectl.py +++ b/tests/test_containers/test_kubectl.py @@ -115,7 +115,7 @@ def test_start_shell_sso(mock_refresh, kubectl_container): # we want a shell, so -> /bin/bash and refresh_sso_credentials flag assert container_args["command"] == "/bin/bash" - assert mock_refresh.called_once + assert mock_refresh.assert_called_once # make sure we are pointing to the right AWS credentials: /tmp/ folder for SSO assert container_args["environment"]["AWS_CONFIG_FILE"] == "/root/tmp/test/config" diff --git a/tests/test_containers/test_terraform.py b/tests/test_containers/test_terraform.py index 4c91e2de..9342d7fa 100644 --- a/tests/test_containers/test_terraform.py +++ b/tests/test_containers/test_terraform.py @@ -36,7 +36,7 @@ def test_refresh_credentials(mock_refresh, terraform_container): # we want a shell, so -> /bin/bash and refresh_sso_credentials flag assert container_args["command"] == 'echo "Done."' - assert mock_refresh.called_once + assert mock_refresh.assert_called_once @mock.patch("leverage.container.refresh_layer_credentials") @@ -44,7 +44,7 @@ def test_auth_method_sso_enabled(mock_refresh, terraform_container): terraform_container.sso_enabled = True terraform_container.auth_method() - assert mock_refresh.called_once + assert mock_refresh.assert_called_once def test_auth_method_mfa_enabled(terraform_container): diff --git a/tests/test_modules/test_credentials.py b/tests/test_modules/test_credentials.py index 317d98d8..a73e7193 100644 --- a/tests/test_modules/test_credentials.py +++ b/tests/test_modules/test_credentials.py @@ -97,7 +97,7 @@ def test_configure_accounts_profiles(mocked_backup, muted_click_context): ) # make sure we did a backup with the old credentials - assert mocked_backup.called_once + assert mocked_backup.assert_called_once # only 1 call since "out-of-project-acc" should be avoided assert mocked_config.call_count == 1 @@ -130,7 +130,7 @@ def test_configure_accounts_profiles_mfa(mocked_backup, mfa_device, muted_click_ ) # make sure we did a backup with the old credentials - assert mocked_backup.called_once + assert mocked_backup.assert_called_once # only 1 call since "out-of-project-acc" should be avoided assert mocked_config.call_count == 1