def test_create_delete_list(self):
        screen_name = json.loads(client.get('http://api.twitter.com/1/account/verify_credentials.json').content)['screen_name']
        user_lists = json.loads(client.get('http://api.twitter.com/1/lists.json', data={'screen_name': screen_name}).content)['lists']
        for list in user_lists:
            if list['name'] == 'OAuth Request Hook':
                client.post('http://api.twitter.com/1/lists/destroy.json', data={'list_id': list['id']})

        created_list = json.loads(client.post('http://api.twitter.com/1/%s/lists.json' % screen_name, data={'name': "OAuth Request Hook"}).content)
        list_id = created_list['id']
        response = client.delete('http://api.twitter.com/1/%s/lists/%s.json' % (screen_name, list_id))
        self.assertEqual(response.status_code, 200)
        self.assertEqual(json.loads(response.content), created_list)
dataset/ETHPy150Open maraujop/requests-oauth/tests/tests.py/TwitterOAuthTestSuite.test_create_delete_list/original