OpenQuizz
Une application de gestion des contenus pédagogiques
CommonTestCase Class Reference

Public Member Functions

def create_app (self)
 
def create_testapp (self, app)
 
def before_create_app (self)
 
def after_create_app (self)
 
def testapp (self)
 
def test_parse_querystring_args (self, testapp)
 
def test_parse_form (self, testapp)
 
def test_parse_json (self, testapp)
 
def test_parse_json_missing (self, testapp)
 
def test_parse_json_or_form (self, testapp)
 
def test_parse_querystring_default (self, testapp)
 
def test_parse_json_with_charset (self, testapp)
 
def test_parse_json_with_vendor_media_type (self, testapp)
 
def test_parse_ignore_extra_data (self, testapp)
 
def test_parse_json_empty (self, testapp)
 
def test_parse_json_error_unexpected_int (self, testapp)
 
def test_parse_json_error_unexpected_list (self, testapp)
 
def test_parse_json_many_schema_invalid_input (self, testapp)
 
def test_parse_json_many_schema (self, testapp)
 
def test_parse_json_many_schema_error_malformed_data (self, testapp)
 
def test_parsing_form_default (self, testapp)
 
def test_parse_querystring_multiple (self, testapp)
 
def test_parse_querystring_multiple_single_value (self, testapp)
 
def test_parse_form_multiple (self, testapp)
 
def test_parse_json_list (self, testapp)
 
def test_parse_json_list_error_malformed_data (self, testapp)
 
def test_parse_json_with_nonascii_chars (self, testapp)
 
def test_parse_json_with_nonutf8_chars (self, testapp)
 
def test_validation_error_returns_422_response (self, testapp)
 
def test_user_validation_error_returns_422_response_by_default (self, testapp)
 
def test_use_args_decorator (self, testapp)
 
def test_use_args_with_path_param (self, testapp)
 
def test_use_args_with_validation (self, testapp)
 
def test_use_kwargs_decorator (self, testapp)
 
def test_use_kwargs_with_path_param (self, testapp)
 
def test_parsing_headers (self, testapp)
 
def test_parsing_cookies (self, testapp)
 
def test_parse_nested_json (self, testapp)
 
def test_parse_nested_many_json (self, testapp)
 
def test_parse_nested_many_missing (self, testapp)
 
def test_parse_files (self, testapp)
 
def test_empty_json (self, testapp)
 
def test_empty_json_with_headers (self, testapp)
 
def test_invalid_json (self, testapp)
 
def test_content_type_mismatch (self, testapp, path, payload, content_type)
 

Static Public Attributes

 scope
 

Detailed Description

Base test class that defines test methods for common functionality across all
parsers. Subclasses must define `create_app`, which returns a WSGI-like app.

Member Function Documentation

◆ after_create_app()

def after_create_app (   self)

◆ before_create_app()

def before_create_app (   self)

◆ create_app()

def create_app (   self)
Return a WSGI app

◆ create_testapp()

def create_testapp (   self,
  app 
)

◆ test_content_type_mismatch()

def test_content_type_mismatch (   self,
  testapp,
  path,
  payload,
  content_type 
)

◆ test_empty_json()

def test_empty_json (   self,
  testapp 
)

◆ test_empty_json_with_headers()

def test_empty_json_with_headers (   self,
  testapp 
)

◆ test_invalid_json()

def test_invalid_json (   self,
  testapp 
)

◆ test_parse_files()

def test_parse_files (   self,
  testapp 
)

◆ test_parse_form()

def test_parse_form (   self,
  testapp 
)

◆ test_parse_form_multiple()

def test_parse_form_multiple (   self,
  testapp 
)

◆ test_parse_ignore_extra_data()

def test_parse_ignore_extra_data (   self,
  testapp 
)

◆ test_parse_json()

def test_parse_json (   self,
  testapp 
)

◆ test_parse_json_empty()

def test_parse_json_empty (   self,
  testapp 
)

◆ test_parse_json_error_unexpected_int()

def test_parse_json_error_unexpected_int (   self,
  testapp 
)

◆ test_parse_json_error_unexpected_list()

def test_parse_json_error_unexpected_list (   self,
  testapp 
)

◆ test_parse_json_list()

def test_parse_json_list (   self,
  testapp 
)

◆ test_parse_json_list_error_malformed_data()

def test_parse_json_list_error_malformed_data (   self,
  testapp 
)

◆ test_parse_json_many_schema()

def test_parse_json_many_schema (   self,
  testapp 
)

◆ test_parse_json_many_schema_error_malformed_data()

def test_parse_json_many_schema_error_malformed_data (   self,
  testapp 
)

◆ test_parse_json_many_schema_invalid_input()

def test_parse_json_many_schema_invalid_input (   self,
  testapp 
)

◆ test_parse_json_missing()

def test_parse_json_missing (   self,
  testapp 
)

◆ test_parse_json_or_form()

def test_parse_json_or_form (   self,
  testapp 
)

◆ test_parse_json_with_charset()

def test_parse_json_with_charset (   self,
  testapp 
)

◆ test_parse_json_with_nonascii_chars()

def test_parse_json_with_nonascii_chars (   self,
  testapp 
)

◆ test_parse_json_with_nonutf8_chars()

def test_parse_json_with_nonutf8_chars (   self,
  testapp 
)

◆ test_parse_json_with_vendor_media_type()

def test_parse_json_with_vendor_media_type (   self,
  testapp 
)

◆ test_parse_nested_json()

def test_parse_nested_json (   self,
  testapp 
)

◆ test_parse_nested_many_json()

def test_parse_nested_many_json (   self,
  testapp 
)

◆ test_parse_nested_many_missing()

def test_parse_nested_many_missing (   self,
  testapp 
)

◆ test_parse_querystring_args()

def test_parse_querystring_args (   self,
  testapp 
)

◆ test_parse_querystring_default()

def test_parse_querystring_default (   self,
  testapp 
)

◆ test_parse_querystring_multiple()

def test_parse_querystring_multiple (   self,
  testapp 
)

◆ test_parse_querystring_multiple_single_value()

def test_parse_querystring_multiple_single_value (   self,
  testapp 
)

◆ test_parsing_cookies()

def test_parsing_cookies (   self,
  testapp 
)

◆ test_parsing_form_default()

def test_parsing_form_default (   self,
  testapp 
)

◆ test_parsing_headers()

def test_parsing_headers (   self,
  testapp 
)

◆ test_use_args_decorator()

def test_use_args_decorator (   self,
  testapp 
)

◆ test_use_args_with_path_param()

def test_use_args_with_path_param (   self,
  testapp 
)

◆ test_use_args_with_validation()

def test_use_args_with_validation (   self,
  testapp 
)

◆ test_use_kwargs_decorator()

def test_use_kwargs_decorator (   self,
  testapp 
)

◆ test_use_kwargs_with_path_param()

def test_use_kwargs_with_path_param (   self,
  testapp 
)

◆ test_user_validation_error_returns_422_response_by_default()

def test_user_validation_error_returns_422_response_by_default (   self,
  testapp 
)

◆ test_validation_error_returns_422_response()

def test_validation_error_returns_422_response (   self,
  testapp 
)

◆ testapp()

def testapp (   self)

Field Documentation

◆ scope

scope
static

The documentation for this class was generated from the following file: