Skip to content

Commit 770d80e

Browse files
committed
SDK-594: Update var and function names
1 parent 01ec7ba commit 770d80e

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

yoti_python_sdk/tests/test_protobuf.py

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55

66
from yoti_python_sdk.protobuf import protobuf
77

8-
string_value = "123"
9-
byte_value = str.encode(string_value)
10-
int_value = int(string_value)
8+
STRING_VALUE = "123"
9+
BYTE_VALUE = str.encode(STRING_VALUE)
10+
INT_VALUE = int(STRING_VALUE)
1111

1212

1313
@pytest.fixture(scope='module')
@@ -17,27 +17,27 @@ def proto():
1717

1818
@pytest.mark.parametrize(
1919
"content_type, expected_value",
20-
[(proto().CT_STRING, string_value),
21-
(proto().CT_DATE, string_value),
22-
(proto().CT_INT, int_value)])
20+
[(proto().CT_STRING, STRING_VALUE),
21+
(proto().CT_DATE, STRING_VALUE),
22+
(proto().CT_INT, INT_VALUE)])
2323
def test_protobuf_values_based_on_content_type(content_type, expected_value):
24-
result = proto().value_based_on_content_type(byte_value, content_type)
24+
result = proto().value_based_on_content_type(BYTE_VALUE, content_type)
2525
assert result == expected_value
2626

2727

28-
def test_warning_protobuf_values_based_on_content_type(proto):
28+
def test_protobuf_values_based_on_other_content_types(proto):
2929
# disable logging for the below types: warning shown as type is not recognized
3030
logger = logging.getLogger()
3131
logger.propagate = False
3232

33-
result = proto.value_based_on_content_type(byte_value, proto.CT_UNDEFINED)
34-
assert result == string_value
33+
result = proto.value_based_on_content_type(BYTE_VALUE, proto.CT_UNDEFINED)
34+
assert result == STRING_VALUE
3535

36-
result = proto.value_based_on_content_type(byte_value)
37-
assert result == string_value
36+
result = proto.value_based_on_content_type(BYTE_VALUE)
37+
assert result == STRING_VALUE
3838

39-
result = proto.value_based_on_content_type(byte_value, 100)
40-
assert result == string_value
39+
result = proto.value_based_on_content_type(BYTE_VALUE, 100)
40+
assert result == STRING_VALUE
4141

4242
logger.propagate = True
4343

@@ -47,8 +47,8 @@ def test_warning_protobuf_values_based_on_content_type(proto):
4747
(proto().CT_JPEG,
4848
proto().CT_PNG))
4949
def test_image_value_based_on_content_type(proto, content_type):
50-
result = proto.value_based_on_content_type(byte_value, content_type)
51-
assert result.data == byte_value
50+
result = proto.value_based_on_content_type(BYTE_VALUE, content_type)
51+
assert result.data == BYTE_VALUE
5252
assert result.content_type == content_type
5353

5454

0 commit comments

Comments
 (0)