<s> from __future__ import unicode_literals <EOL> from django . utils import six <EOL> from reviewboard . webapi . resources import resources <EOL> from reviewboard . webapi . tests . base import BaseWebAPITestCase <EOL> from reviewboard . webapi . tests . mimetypes import server_info_mimetype <EOL> from reviewboard . webapi . tests . mixins import BasicTestsMetaclass <EOL> from reviewboard . webapi . tests . urls import get_server_info_url <EOL> @ six . add_metaclass ( BasicTestsMetaclass ) <EOL> class ResourceTests ( BaseWebAPITestCase ) : <EOL> """<STR_LIT>""" <EOL> fixtures = [ '<STR_LIT>' ] <EOL> sample_api_url = '<STR_LIT>' <EOL> resource = resources . server_info <EOL> def setup_http_not_allowed_list_test ( self , user ) : <EOL> return get_server_info_url ( ) <EOL> def setup_http_not_allowed_item_test ( self , user ) : <EOL> return get_server_info_url ( ) <EOL> def compare_item ( self , item_rsp , obj ) : <EOL> self . assertIn ( '<STR_LIT>' , item_rsp ) <EOL> self . assertIn ( '<STR_LIT>' , item_rsp ) <EOL> self . assertIn ( '<STR_LIT>' , item_rsp ) <EOL> caps = item_rsp [ '<STR_LIT>' ] <EOL> self . assertIn ( '<STR_LIT>' , caps ) <EOL> diffs_caps = caps [ '<STR_LIT>' ] <EOL> self . assertTrue ( diffs_caps [ '<STR_LIT>' ] ) <EOL> self . assertTrue ( diffs_caps [ '<STR_LIT>' ] ) <EOL> diff_validation_caps = diffs_caps [ '<STR_LIT>' ] <EOL> self . assertTrue ( diff_validation_caps [ '<STR_LIT>' ] ) <EOL> review_request_caps = caps [ '<STR_LIT>' ] <EOL> self . assertTrue ( review_request_caps [ '<STR_LIT>' ] ) <EOL> text_caps = caps [ '<STR_LIT:text>' ] <EOL> self . assertTrue ( text_caps [ '<STR_LIT>' ] ) <EOL> def setup_basic_get_test ( self , user , with_local_site , local_site_name ) : <EOL> return ( get_server_info_url ( local_site_name ) , <EOL> server_info_mimetype , <EOL> None ) </s>
