Skip to content

Commit 911811e

Browse files
committed
merge in develop
2 parents 4e4067e + 40a5a04 commit 911811e

File tree

4 files changed

+54
-15
lines changed

4 files changed

+54
-15
lines changed

.github/workflows/test.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@ on:
1010
- main
1111
- develop
1212
pull_request:
13-
branches:
14-
- main
15-
- develop
1613
workflow_dispatch:
1714

1815
jobs:

build.savant

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2018-2024, FusionAuth, All Rights Reserved
2+
* Copyright (c) 2018-2025, FusionAuth, All Rights Reserved
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
1414
* language governing permissions and limitations under the License.
1515
*/
1616

17-
project(group: "io.fusionauth", name: "fusionauth-python-client", version: "1.58.0", licenses: ["ApacheV2_0"]) {
17+
project(group: "io.fusionauth", name: "fusionauth-python-client", version: "1.60.0", licenses: ["ApacheV2_0"]) {
1818
workflow {
1919
fetch {
2020
cache()
@@ -50,7 +50,7 @@ target(name: "clean", description: "Cleans the build directory") {
5050
target(name: "compile", description: "Builds archives of the source and compiled versions of the code.", dependsOn: ["setup-python"]) {
5151
def proc = "python3 setup.py sdist bdist_wheel".execute()
5252
proc.consumeProcessOutput(System.out, System.err)
53-
proc.waitFor()
53+
assert proc.waitFor() == 0
5454
}
5555

5656
target(name: "int", description: "Releases a local integration build of the project", dependsOn: ["compile"]) {
@@ -78,11 +78,11 @@ target(name: "test", description: "Runs the project's tests", dependsOn: ["compi
7878
target(name: "setup-python", description: "Gets the python dependencies") {
7979
def proc1 = "python3 -m pip install --user --upgrade setuptools".execute()
8080
proc1.consumeProcessOutput(System.out, System.err)
81-
proc1.waitFor()
81+
assert proc1.waitFor() == 0
8282

8383
def proc2 = "python3 -m pip install --user --upgrade wheel twine requests deprecated".execute()
8484
proc2.consumeProcessOutput(System.out, System.err)
85-
proc2.waitFor()
85+
assert proc2.waitFor() == 0
8686
}
8787

8888
/**
@@ -104,8 +104,7 @@ target(name: "publish", description: "Publishes source and built versions of the
104104

105105
def process = pb.start()
106106
process.consumeProcessOutput(System.out, System.err)
107-
process.waitFor()
108-
return process.exitValue() == 0
107+
assert process.waitFor() == 0
109108
}
110109

111110
target(name: "release", description: "Releases a full version of the project", dependsOn: ["int"]) {

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
setup(
77
name="fusionauth-client",
8-
version="1.58.0",
8+
version="1.60.0",
99
author="FusionAuth",
1010
author_email="[email protected]",
1111
description="A client library for FusionAuth",

src/test/python/fusionauth/fusionauth_client_test.py

Lines changed: 47 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,28 @@
1-
# Copyright (c) 2024, FusionAuth, All Rights Reserved
1+
# Copyright (c) 2024-2025, FusionAuth, All Rights Reserved
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing,
10+
# software distributed under the License is distributed on an
11+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
12+
# either express or implied. See the License for the specific
13+
# language governing permissions and limitations under the License.
14+
#
15+
# Licensed under the Apache License, Version 2.0 (the "License");
16+
# you may not use this file except in compliance with the License.
17+
# You may obtain a copy of the License at
18+
#
19+
# http://www.apache.org/licenses/LICENSE-2.0
20+
#
21+
# Unless required by applicable law or agreed to in writing,
22+
# software distributed under the License is distributed on an
23+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
24+
# either express or implied. See the License for the specific
25+
# language governing permissions and limitations under the License.
226
#
327
# Licensed under the Apache License, Version 2.0 (the "License");
428
# you may not use this file except in compliance with the License.
@@ -26,9 +50,8 @@
2650

2751
import json
2852
import os
29-
import uuid
30-
3153
import unittest
54+
import uuid
3255

3356
from fusionauth.fusionauth_client import FusionAuthClient
3457

@@ -51,7 +74,8 @@ def runTest(self):
5174
def test_retrieve_applications(self):
5275
client_response = self.client.retrieve_applications()
5376
self.assertEqual(client_response.status, 200)
54-
self.assertEqual(len(client_response.success_response['applications']), 2)
77+
# tnent manager is 1 application, admin is another, Pied piper in the kickstart is the 3rd.
78+
self.assertEqual(len(client_response.success_response['applications']), 3)
5579

5680
def test_create_user_retrieve_user(self):
5781
# Check if the user already exists.
@@ -84,6 +108,25 @@ def test_create_user_retrieve_user(self):
84108
self.assertFalse('password' in get_user_response.success_response['user'])
85109
self.assertFalse('salt' in get_user_response.success_response['user'])
86110

111+
# Retrieve the user via loginId
112+
get_user_response = self.client.retrieve_user_by_login_id('[email protected]')
113+
self.assertEqual(get_user_response.status, 200)
114+
self.assertIsNotNone(get_user_response.success_response)
115+
self.assertIsNone(get_user_response.error_response)
116+
self.assertEqual(get_user_response.success_response['user']['email'], '[email protected]')
117+
118+
# Explicit loginIdType
119+
get_user_response = self.client.retrieve_user_by_login_id_with_login_id_types('[email protected]', ['email'])
120+
self.assertEqual(get_user_response.status, 200)
121+
self.assertIsNotNone(get_user_response.success_response)
122+
self.assertIsNone(get_user_response.error_response)
123+
self.assertEqual(get_user_response.success_response['user']['email'], '[email protected]')
124+
125+
# TODO: Once issue 1 is released, this test should pass
126+
# # wrong loginIdType
127+
# get_user_response = self.client.retrieve_user_by_login_id_with_login_id_types('[email protected]', ['phoneNumber'])
128+
# self.assertEqual(get_user_response.status, 404)
129+
87130
def test_retrieve_user_missing(self):
88131
user_id = uuid.uuid4()
89132
client_response = self.client.retrieve_user(user_id)

0 commit comments

Comments
 (0)