Skip to content

Integration Testing Fixtures

dlitvakb edited this page Dec 18, 2012 · 2 revisions

Integration Testing Fixtures

The following document contains the fixtures for integration testing on RWS API

Each fixture will be presented in the following format

{'uri': URL, 'method': HTTP Method, 'data': Parameters, 'expected_code': Expected Code, 'return_field': Field name to read,
   'setup_information': {
     'uri': Set up URL, 'method': HTTP Method, 'data': Parameters, 'expected_code': Expected Code, 'return_field': Field name to read
   },
   'rollback_information': {
     'uri': Rollback URL, 'method': HTTP Method, 'data': Parameters, 'expected_code': Expected Code
   },
}

Required fields:

  • uri

Optional fields:

  • method: defaults to get
  • data: defaults to empty
  • expected_code: defaults to 200
  • return_field: defaults to empty
  • setup_information: defaults to empty
  • rollback_information: defaults to empty

Setup information fields:

Required:

  • uri

Optional:

  • method: defaults to get
  • data: defaults to empty
  • expected_code: defaults to 200
  • return_field: defaults to empty

Rollback information fields:

Required:

  • uri

Optional:

  • method: defaults to get
  • data: defaults to empty
  • expected_code: defaults to 200

An example fixture is the following:

{
  'uri': '/zones/pull.json',
  'method': 'post',
  'data': {'name': 'test_zone', 'url':'http://google.com'},
  'return_field': 'bucket_id'
  'rollback_information': {
    'uri': '/zones/pull.json/%s', 'method': 'delete'
  }
}