@@ -18,7 +18,7 @@ def setUp(self):
1818 def test_getattr (self ):
1919 client = fastrpc .ServerProxy (
2020 self .url , readTimeout = 1000 , writeTimeout = 1000 , connectTimeout = 1000 ,
21- useBinary = fastrpc .ON_SUPPORT_ON_KEEP_ALIVE )
21+ useBinary = fastrpc .ON_SUPPORT_ON_KEEP_ALIVE , hideAttributes = False )
2222
2323 for attr in self .attributes_names :
2424 self .assertEqual (getattr (client , attr ), getattr (self , attr ))
@@ -28,7 +28,7 @@ def test_hideAttibutes(self):
2828 If hideAttributes parametr is set to True in constructor of ServerProxy
2929 all serverproxy attrs should be taken as frpc call attempt (proxy.url(), proxy.path()...)
3030 """
31- without_hide = fastrpc .ServerProxy (
31+ default_hide = fastrpc .ServerProxy (
3232 self .url , readTimeout = 1 , writeTimeout = 1 , connectTimeout = 1 ,
3333 useBinary = fastrpc .ON_SUPPORT_ON_KEEP_ALIVE )
3434
@@ -48,10 +48,9 @@ def try_typeerror(client, exception):
4848 for attr in self .attributes_names :
4949 self .assertRaises (exception , lambda : getattr (client , attr )())
5050
51- try_attr (without_hide )
5251 try_attr (without_hide_false )
5352
54- try_typeerror (without_hide , TypeError )
53+ try_typeerror (default_hide , ProtocolError )
5554 try_typeerror (without_hide_false , TypeError )
5655 try_typeerror (with_hide , ProtocolError )
5756
@@ -121,9 +120,9 @@ def test_configparser(self):
121120
122121 client = fastrpc .ServerProxy (config_parser , section )
123122
124- self .assertEqual (getattr ( client , "host " ), self .host )
125- self .assertEqual (getattr ( client , "port " ), self .port )
126- self .assertEqual (getattr ( client , "url " ), self .url )
123+ self .assertEqual (client ( "get_host " ), self .host )
124+ self .assertEqual (client ( "get_port " ), self .port )
125+ self .assertEqual (client ( "get_url " ), self .url )
127126
128127
129128if __name__ == '__main__' :
0 commit comments