Newer
Older
postorius / src / postorius / tests / fixtures / vcr_cassettes / test_list_members_owner_add_remove.yaml
@Aurélien Bompard Aurélien Bompard on 28 Nov 2015 11 KB Owners can remove themselves but not the last owner
interactions:
- request:
    body: null
    headers:
      accept-encoding: ['gzip, deflate']
    method: !!python/unicode 'GET'
    uri: http://localhost:9001/3.0/lists/foo@example.com
  response:
    body: {string: !!python/unicode '{"display_name": "Foo", "fqdn_listname": "foo@example.com",
        "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\"", "list_id": "foo.example.com",
        "list_name": "foo", "mail_host": "example.com", "member_count": 0, "self_link":
        "http://localhost:9001/3.0/lists/foo.example.com", "volume": 1}'}
    headers:
      content-length: ['294']
      content-type: [application/json; charset=utf-8]
    status: {code: 200, message: OK}
- request:
    body: null
    headers:
      accept-encoding: ['gzip, deflate']
    method: !!python/unicode 'GET'
    uri: http://localhost:9001/3.0/users/su@example.com
  response:
    body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag":
        "\"eb591d9720aa0ac944b49315b6af1c950410b54c\"", "is_server_owner": false,
        "self_link": "http://localhost:9001/3.0/users/1", "user_id": 1}'}
    headers:
      content-length: ['188']
      content-type: [application/json; charset=utf-8]
    status: {code: 200, message: OK}
- request:
    body: null
    headers:
      accept-encoding: ['gzip, deflate']
    method: !!python/unicode 'GET'
    uri: http://localhost:9001/3.0/users/1/addresses
  response:
    body: {string: !!python/unicode '{"entries": [{"email": "su@example.com", "http_etag":
        "\"639f603b44bc4e3f588ffb045be45e858421b98e\"", "original_email": "su@example.com",
        "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/su@example.com",
        "user": "http://localhost:9001/3.0/users/1"}], "http_etag": "\"a6e81d562465e6007ef87e1a4af8366feac12d19\"",
        "start": 0, "total_size": 1}'}
    headers:
      content-length: ['381']
      content-type: [application/json; charset=utf-8]
    status: {code: 200, message: OK}
- request:
    body: null
    headers:
      accept-encoding: ['gzip, deflate']
    method: !!python/unicode 'GET'
    uri: http://localhost:9001/3.0/addresses/su@example.com
  response:
    body: {string: !!python/unicode '{"email": "su@example.com", "http_etag": "\"639f603b44bc4e3f588ffb045be45e858421b98e\"",
        "original_email": "su@example.com", "registered_on": "2005-08-01T07:49:23",
        "self_link": "http://localhost:9001/3.0/addresses/su@example.com", "user":
        "http://localhost:9001/3.0/users/1"}'}
    headers:
      content-length: ['276']
      content-type: [application/json; charset=utf-8]
    status: {code: 200, message: OK}
- request:
    body: null
    headers:
      accept-encoding: ['gzip, deflate']
    method: !!python/unicode 'GET'
    uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner
  response:
    body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/su@example.com",
        "delivery_mode": "regular", "email": "su@example.com", "http_etag": "\"72e5bacea555ad25032c9d529b12ac9404eadf57\"",
        "list_id": "foo.example.com", "member_id": 1, "role": "owner", "self_link":
        "http://localhost:9001/3.0/members/1", "user": "http://localhost:9001/3.0/users/1"}],
        "http_etag": "\"412a6358fd93e549c57c67c316f6fd823329ff99\"", "start": 0, "total_size":
        1}'}
    headers:
      content-length: ['446']
      content-type: [application/json; charset=utf-8]
    status: {code: 200, message: OK}
- request:
    body: null
    headers:
      accept-encoding: ['gzip, deflate']
    method: !!python/unicode 'GET'
    uri: http://localhost:9001/3.0/lists/foo.example.com/roster/moderator
  response:
    body: {string: !!python/unicode '{"http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"",
        "start": 0, "total_size": 0}'}
    headers:
      content-length: ['90']
      content-type: [application/json; charset=utf-8]
    status: {code: 200, message: OK}
- request:
    body: subscriber=newowner%40example.com&role=owner&list_id=foo.example.com
    headers:
      accept-encoding: ['gzip, deflate']
      !!python/unicode 'content-type': [!!python/unicode 'application/x-www-form-urlencoded']
    method: !!python/unicode 'POST'
    uri: http://localhost:9001/3.0/members
  response:
    body: {string: !!python/unicode ''}
    headers:
      content-length: ['0']
      location: ['http://localhost:9001/3.0/members/2']
    status: {code: 201, message: Created}
- request:
    body: null
    headers:
      accept-encoding: ['gzip, deflate']
    method: !!python/unicode 'GET'
    uri: http://localhost:9001/3.0/lists/foo@example.com/roster/member?count=1&page=1
  response:
    body: {string: !!python/unicode '{"http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"",
        "start": 0, "total_size": 0}'}
    headers:
      content-length: ['90']
      content-type: [application/json; charset=utf-8]
    status: {code: 200, message: OK}
- request:
    body: null
    headers:
      accept-encoding: ['gzip, deflate']
    method: !!python/unicode 'GET'
    uri: http://localhost:9001/3.0/lists/foo@example.com/roster/member?count=25&page=1
  response:
    body: {string: !!python/unicode '{"http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"",
        "start": 0, "total_size": 0}'}
    headers:
      content-length: ['90']
      content-type: [application/json; charset=utf-8]
    status: {code: 200, message: OK}
- request:
    body: null
    headers:
      accept-encoding: ['gzip, deflate']
    method: !!python/unicode 'GET'
    uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner
  response:
    body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/newowner@example.com",
        "delivery_mode": "regular", "email": "newowner@example.com", "http_etag":
        "\"3cd95533f48bade9cf7cd736dc8610586e170db5\"", "list_id": "foo.example.com",
        "member_id": 2, "role": "owner", "self_link": "http://localhost:9001/3.0/members/2",
        "user": "http://localhost:9001/3.0/users/2"}, {"address": "http://localhost:9001/3.0/addresses/su@example.com",
        "delivery_mode": "regular", "email": "su@example.com", "http_etag": "\"72e5bacea555ad25032c9d529b12ac9404eadf57\"",
        "list_id": "foo.example.com", "member_id": 1, "role": "owner", "self_link":
        "http://localhost:9001/3.0/members/1", "user": "http://localhost:9001/3.0/users/1"}],
        "http_etag": "\"c8683b1fae7a2ad2c5fa0b1e4bdadbf5e94fb1e4\"", "start": 0, "total_size":
        2}'}
    headers:
      content-length: ['801']
      content-type: [application/json; charset=utf-8]
    status: {code: 200, message: OK}
- request:
    body: null
    headers:
      accept-encoding: ['gzip, deflate']
    method: !!python/unicode 'GET'
    uri: http://localhost:9001/3.0/lists/foo.example.com/roster/moderator
  response:
    body: {string: !!python/unicode '{"http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"",
        "start": 0, "total_size": 0}'}
    headers:
      content-length: ['90']
      content-type: [application/json; charset=utf-8]
    status: {code: 200, message: OK}
- request:
    body: null
    headers:
      accept-encoding: ['gzip, deflate']
    method: !!python/unicode 'GET'
    uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner
  response:
    body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/newowner@example.com",
        "delivery_mode": "regular", "email": "newowner@example.com", "http_etag":
        "\"3cd95533f48bade9cf7cd736dc8610586e170db5\"", "list_id": "foo.example.com",
        "member_id": 2, "role": "owner", "self_link": "http://localhost:9001/3.0/members/2",
        "user": "http://localhost:9001/3.0/users/2"}, {"address": "http://localhost:9001/3.0/addresses/su@example.com",
        "delivery_mode": "regular", "email": "su@example.com", "http_etag": "\"72e5bacea555ad25032c9d529b12ac9404eadf57\"",
        "list_id": "foo.example.com", "member_id": 1, "role": "owner", "self_link":
        "http://localhost:9001/3.0/members/1", "user": "http://localhost:9001/3.0/users/1"}],
        "http_etag": "\"c8683b1fae7a2ad2c5fa0b1e4bdadbf5e94fb1e4\"", "start": 0, "total_size":
        2}'}
    headers:
      content-length: ['801']
      content-type: [application/json; charset=utf-8]
    status: {code: 200, message: OK}
- request:
    body: null
    headers:
      accept-encoding: ['gzip, deflate']
    method: !!python/unicode 'GET'
    uri: http://localhost:9001/3.0/lists/foo@example.com
  response:
    body: {string: !!python/unicode '{"display_name": "Foo", "fqdn_listname": "foo@example.com",
        "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\"", "list_id": "foo.example.com",
        "list_name": "foo", "mail_host": "example.com", "member_count": 0, "self_link":
        "http://localhost:9001/3.0/lists/foo.example.com", "volume": 1}'}
    headers:
      content-length: ['294']
      content-type: [application/json; charset=utf-8]
    status: {code: 200, message: OK}
- request:
    body: null
    headers:
      accept-encoding: ['gzip, deflate']
    method: !!python/unicode 'GET'
    uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner
  response:
    body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/newowner@example.com",
        "delivery_mode": "regular", "email": "newowner@example.com", "http_etag":
        "\"3cd95533f48bade9cf7cd736dc8610586e170db5\"", "list_id": "foo.example.com",
        "member_id": 2, "role": "owner", "self_link": "http://localhost:9001/3.0/members/2",
        "user": "http://localhost:9001/3.0/users/2"}, {"address": "http://localhost:9001/3.0/addresses/su@example.com",
        "delivery_mode": "regular", "email": "su@example.com", "http_etag": "\"72e5bacea555ad25032c9d529b12ac9404eadf57\"",
        "list_id": "foo.example.com", "member_id": 1, "role": "owner", "self_link":
        "http://localhost:9001/3.0/members/1", "user": "http://localhost:9001/3.0/users/1"}],
        "http_etag": "\"c8683b1fae7a2ad2c5fa0b1e4bdadbf5e94fb1e4\"", "start": 0, "total_size":
        2}'}
    headers:
      content-length: ['801']
      content-type: [application/json; charset=utf-8]
    status: {code: 200, message: OK}
- request:
    body: null
    headers:
      accept-encoding: ['gzip, deflate']
    method: !!python/unicode 'DELETE'
    uri: http://localhost:9001/3.0/lists/foo@example.com/owner/newowner@example.com
  response:
    body: {string: !!python/unicode ''}
    headers:
      content-length: ['0']
    status: {code: 204, message: No Content}
- request:
    body: null
    headers:
      accept-encoding: ['gzip, deflate']
    method: !!python/unicode 'GET'
    uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner
  response:
    body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/su@example.com",
        "delivery_mode": "regular", "email": "su@example.com", "http_etag": "\"72e5bacea555ad25032c9d529b12ac9404eadf57\"",
        "list_id": "foo.example.com", "member_id": 1, "role": "owner", "self_link":
        "http://localhost:9001/3.0/members/1", "user": "http://localhost:9001/3.0/users/1"}],
        "http_etag": "\"412a6358fd93e549c57c67c316f6fd823329ff99\"", "start": 0, "total_size":
        1}'}
    headers:
      content-length: ['446']
      content-type: [application/json; charset=utf-8]
    status: {code: 200, message: OK}
version: 1