def test_add_valid_input(self):
""" Тест запроса и ввод валидных данных """
self.client.login(username=self.credentials['username'],
password=self.credentials['password'])
response = self.client.get(reverse_lazy('companies_registration'))
self.assertEqual(response.status_code, HTTPStatus.OK)
response = self.client.post(reverse_lazy('companies_registration'),
{'name': 'Some company',
'description': 'Some description',
'logo_url': '',
'form-TOTAL_FORMS': '5',
'form-INITIAL_FORMS': '0',
'form-MAX_NUM_FORMS': '5',
'form-MIN_NUM_FORMS': '0'})
self.assertEqual(response.status_code, HTTPStatus.OK)
self.assertRedirects(response, reverse('dashboard_company',
kwargs={'pk': self.data_collection['company'].id}))