def test_negative_get_with_no_args(self):
        """Issue an HTTP GET to the base content view filters path.

        :id: da29fd90-cd96-49f9-b94e-71d4e3a35a57

        :expectedresults: An HTTP 200 response is received if a GET request is
            issued with no arguments specified.

        :CaseLevel: Integration
        """
        response = client.get(
            entities.AbstractContentViewFilter().path(),
            auth=settings.server.get_credentials(),
            verify=False,
        )
        self.assertEqual(response.status_code, http_client.OK)
    def test_negative_get_with_bad_args(self):
        """Issue an HTTP GET to the base content view filters path.

        :id: e6fea726-930b-4b74-b784-41528811994f

        :expectedresults: An HTTP 200 response is received if a GET request is
            issued with bad arguments specified.

        :CaseLevel: Integration
        """
        response = client.get(
            entities.AbstractContentViewFilter().path(),
            auth=settings.server.get_credentials(),
            verify=False,
            data={'foo': 'bar'},
        )
        self.assertEqual(response.status_code, http_client.OK)
Beispiel #3
0
    def test_negative_get_with_no_args(self):
        """Issue an HTTP GET to the base content view filters path.

        @Feature: ContentViewFilter

        @Assert: An HTTP 400 or 422 response is received if a GET request is
        issued with no arguments specified.

        This test targets bugzilla bug #1102120.
        """
        response = client.get(
            entities.AbstractContentViewFilter().path(),
            auth=settings.server.get_credentials(),
            verify=False,
        )
        self.assertIn(
            response.status_code,
            (http_client.BAD_REQUEST, http_client.UNPROCESSABLE_ENTITY))