Skip to content
This repository was archived by the owner on Jan 13, 2023. It is now read-only.

Commit 9311bd1

Browse files
committed
added test for single address
1 parent 0b757c8 commit 9311bd1

File tree

1 file changed

+15
-18
lines changed

1 file changed

+15
-18
lines changed

test/commands/extended/is_reattachable_test.py

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -59,24 +59,6 @@ def test_pass_happy_path(self):
5959
},
6060
)
6161

62-
# def test_pass_single_address(self):
63-
# """
64-
# The incoming request contains a single address
65-
# """
66-
# request = {
67-
# 'addresses': Address(self.address_1)
68-
# }
69-
#
70-
# filter_ = self._filter(request)
71-
#
72-
# self.assertFilterPasses(filter_)
73-
# self.assertDictEqual(
74-
# filter_.cleaned_data,
75-
# {
76-
# 'addresses': text_type(Address(self.address_1))
77-
# },
78-
# )
79-
8062
def test_pass_compatible_types(self):
8163
"""
8264
The incoming request contains values that can be converted to the
@@ -130,6 +112,21 @@ def test_fail_empty(self):
130112
},
131113
)
132114

115+
def test_fail_single_address(self):
116+
"""
117+
The incoming request contains a single address
118+
"""
119+
request = {
120+
'addresses': Address(self.address_1)
121+
}
122+
123+
self.assertFilterErrors(
124+
request,
125+
{
126+
'addresses': [f.Type.CODE_WRONG_TYPE],
127+
}
128+
)
129+
133130

134131
# noinspection SpellCheckingInspection
135132
class IsReattachableResponseFilterTestCase(BaseFilterTestCase):

0 commit comments

Comments
 (0)