@@ -27,13 +27,13 @@ def test_client(self):
2727 client = OpaClient ("localhost" , 8181 , "v1" )
2828 self .assertEqual ("http://localhost:8181/v1" , client ._root_url )
2929
30- client = OpaClient ("127.0.0.1 " , 8181 , "v1" )
31- self .assertEqual ("http://127.0.0.1 :8181/v1" , client ._root_url )
30+ client = OpaClient ("localhost " , 8181 , "v1" )
31+ self .assertEqual ("http://localhost :8181/v1" , client ._root_url )
3232
3333 self .assertFalse (False , self .myclient ._secure )
3434 self .assertEqual ("http://" , self .myclient ._schema )
3535 self .assertEqual ("v1" , self .myclient ._version )
36- self .assertEqual ("127.0.0.1 " , self .myclient ._host )
36+ self .assertEqual ("localhost " , self .myclient ._host )
3737 self .assertEqual (8181 , self .myclient ._port )
3838
3939 def test_functions (self ):
@@ -53,7 +53,7 @@ def test_functions(self):
5353 print (rr )
5454 try :
5555 my_dict = {'test' : {'path' : [
56- 'http://127.0.0.1 :8181/v1/data/play' ], 'rules' : ['http://127.0.0.1 :8181/v1/data/play/hello' ]}}
56+ 'http://localhost :8181/v1/data/play' ], 'rules' : ['http://localhost :8181/v1/data/play/hello' ]}}
5757
5858 self .assertEqual (my_dict , self .myclient .get_policies_info ())
5959 except Exception as testing :
@@ -77,8 +77,8 @@ def test_functions(self):
7777
7878 # self.assertEqual(self.myclient.update_opa_policy_fromurl())
7979 self .assertEqual (["test" ], self .myclient .get_policies_list ())
80- my_dict = {'test' : {'path' : ['http://127.0.0.1 :8181/v1/data/play' ],
81- 'rules' : ['http://127.0.0.1 :8181/v1/data/play/hello' ]}}
80+ my_dict = {'test' : {'path' : ['http://localhost :8181/v1/data/play' ],
81+ 'rules' : ['http://localhost :8181/v1/data/play/hello' ]}}
8282
8383 self .assertEqual (my_dict , self .myclient .get_policies_info ())
8484
0 commit comments