Skip to content

Commit 8e89f01

Browse files
committed
Merge release/2.15.0 -> development
2 parents 2daf3fc + 66a167c commit 8e89f01

File tree

5 files changed

+12
-39
lines changed

5 files changed

+12
-39
lines changed

.github/workflows/tests.yaml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,15 @@ jobs:
4141
- uses: actions/checkout@v2
4242

4343
- uses: actions/[email protected]
44+
with:
45+
python-version: 3.9
4446

45-
- run: pip install -U setuptools==45
46-
47-
- run: pip install wheel
47+
- run: pip install --upgrade setuptools
4848

4949
- run: pushd examples/aml && pip install -r requirements.txt && popd
5050

51+
- run: pushd examples/yoti_example_django && pip install --upgrade pip && pip install -r requirements.txt && popd
52+
5153
- run: pushd examples/yoti_example_flask && pip install -r requirements.txt && popd
54+
55+
- run: pushd examples/doc_scan && pip install -r requirements.txt && popd

examples/yoti_example_flask/requirements.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
cffi>=1.15.0
22
flask>=1.0.4
3-
jinja2>=2.8.1
3+
jinja2>=3.0.3
44
pyopenssl>=19.0.0
55
python-dotenv>=0.7.1
66
requests>=2.20.0

examples/yoti_example_flask/requirements.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ iso8601==0.1.13
3232
# via yoti
3333
itsdangerous==0.24
3434
# via flask
35-
jinja2==2.10.1
35+
jinja2==3.0.3
3636
# via
3737
# -r requirements.in
3838
# flask
39-
markupsafe==1.0
39+
markupsafe==2.0.1
4040
# via jinja2
4141
protobuf==3.6.0
4242
# via yoti
@@ -56,6 +56,7 @@ requests==2.21.0
5656
# yoti
5757
six==1.16.0
5858
# via
59+
# -r requirements.in
5960
# cryptography
6061
# protobuf
6162
# pyopenssl

yoti_python_sdk/dynamic_sharing_service/policy/source_constraint_builder.py

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ class SourceConstraintBuilder(object):
1515
def __init__(self):
1616
self.__soft_preference = False
1717
self.__anchors = []
18-
self.__is_strictly_latin = None
1918

2019
def with_soft_preference(self, value=True):
2120
"""
@@ -65,27 +64,14 @@ def with_driving_licence(self, subtype=""):
6564
"""
6665
return self.with_anchor_by_name(ANCHOR_VALUE_DRIVING_LICENCE, subtype)
6766

68-
def allow_strictly_latin(self):
69-
self.__is_strictly_latin = True
70-
return self
71-
72-
def disable_strictly_latin(self):
73-
self.__is_strictly_latin = False
74-
return self
75-
7667
def build(self):
7768
"""
7869
:returns: A dict describing the source constraint
7970
"""
80-
constrain = {
71+
return {
8172
"type": "SOURCE",
8273
"preferred_sources": {
8374
"soft_preference": self.__soft_preference,
8475
"anchors": self.__anchors,
8576
},
8677
}
87-
88-
if self.__is_strictly_latin is not None:
89-
constrain["is_strictly_latin"] = self.__is_strictly_latin
90-
91-
return constrain

yoti_python_sdk/tests/dynamic_sharing_service/policy/test_source_constraint_builder.py

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -33,21 +33,3 @@ def test_with_soft_preference():
3333
assert ANCHOR_VALUE_DRIVING_LICENCE in [a["name"] for a in anchors]
3434
assert ANCHOR_VALUE_PASSPORT in [a["name"] for a in anchors]
3535
assert constraint["preferred_sources"]["soft_preference"]
36-
37-
38-
def test_with_is_strictly_latin_set_true():
39-
constraint = SourceConstraintBuilder().allow_strictly_latin().build()
40-
41-
assert constraint["is_strictly_latin"] is True
42-
43-
44-
def test_with_is_strictly_latin_set_false():
45-
constraint = SourceConstraintBuilder().disable_strictly_latin().build()
46-
47-
assert constraint["is_strictly_latin"] is False
48-
49-
50-
def test_with_is_strictly_latin_default():
51-
constraint = SourceConstraintBuilder().build()
52-
53-
assert "is_strictly_latin" not in constraint

0 commit comments

Comments
 (0)