A
Size: a a a
A
Д
VA
AD
A
<@pytest.fixture()>
def symbol_return_test(self):
symbols = [lt for lt in string.ascii_lowercase]
symbols.extend([str(n) for n in range(10)])
api_sections = [''.join((section, '?search=')) for section in ['/people/', '/films/', '/starships/', '/vehicles/', '/species/', 'planets']]
api_requests = [''.join(parameter) for parameter in itertools.product(api_sections, symbols)]
for req in api_requests:
yield ''.join((self.SW_API_BASE_LINK, req))
@pytest.mark.parametrize('symbol_return_test')
def test_symbol(self, symbol_return_test):
swapi_request = requests.get(symbol_return_test)
if symbol_return_test[-1] in ['6', '9', '0']:
assert int(swapi_request.json()['count']) == 0
else:
assert int(swapi_request.json()['count']) >= 1
A
А
ID
A
k
I
ID
VA
VA
ID
VA
ID
VA