'Testing whether an error is returned if we are passing an invalid dictionary that is too deep'

@deferred(timeout=10)
def test_set_settings_invalid_dict(self):

    def verify_response(response):
        json_dict = json.loads(response)
        self.assertTrue(('error' in json_dict))
    self.should_check_equality = False
    post_data = json.dumps({'a': {'b': {'c': 'd'}}})
    return self.do_request('settings', expected_code=500, request_type='POST', post_data=post_data, raw_data=True).addCallback(verify_response)
