@@ -33,9 +33,9 @@ def test_ctor(self):
3333
3434 http = object ()
3535 client = self ._make_one (self .KEY , http = http )
36- self .assertIsInstance (client .connection , Connection )
37- self .assertIsNone (client .connection .credentials )
38- self .assertIs (client .connection .http , http )
36+ self .assertIsInstance (client ._connection , Connection )
37+ self .assertIsNone (client ._connection .credentials )
38+ self .assertIs (client ._connection .http , http )
3939 self .assertEqual (client .target_language , ENGLISH_ISO_639 )
4040
4141 def test_ctor_non_default (self ):
@@ -44,9 +44,9 @@ def test_ctor_non_default(self):
4444 http = object ()
4545 target = 'es'
4646 client = self ._make_one (self .KEY , http = http , target_language = target )
47- self .assertIsInstance (client .connection , Connection )
48- self .assertIsNone (client .connection .credentials )
49- self .assertIs (client .connection .http , http )
47+ self .assertIsInstance (client ._connection , Connection )
48+ self .assertIsNone (client ._connection .credentials )
49+ self .assertIs (client ._connection .http , http )
5050 self .assertEqual (client .target_language , target )
5151
5252 def test_get_languages (self ):
@@ -63,7 +63,7 @@ def test_get_languages(self):
6363 'languages' : supported ,
6464 },
6565 }
66- conn = client .connection = _Connection (data )
66+ conn = client ._connection = _Connection (data )
6767
6868 result = client .get_languages ()
6969 self .assertEqual (result , supported )
@@ -88,7 +88,7 @@ def test_get_languages_no_target(self):
8888 'languages' : supported ,
8989 },
9090 }
91- conn = client .connection = _Connection (data )
91+ conn = client ._connection = _Connection (data )
9292
9393 result = client .get_languages ()
9494 self .assertEqual (result , supported )
@@ -113,7 +113,7 @@ def test_get_languages_explicit_target(self):
113113 'languages' : supported ,
114114 },
115115 }
116- conn = client .connection = _Connection (data )
116+ conn = client ._connection = _Connection (data )
117117
118118 result = client .get_languages (target_language )
119119 self .assertEqual (result , supported )
@@ -129,7 +129,7 @@ def test_get_languages_explicit_target(self):
129129 def test_detect_language_bad_result (self ):
130130 client = self ._make_one (self .KEY )
131131 value = 'takoy'
132- conn = client .connection = _Connection ({})
132+ conn = client ._connection = _Connection ({})
133133
134134 with self .assertRaises (ValueError ):
135135 client .detect_language (value )
@@ -159,7 +159,7 @@ def test_detect_language_single_value(self):
159159 'detections' : [[detection ]],
160160 },
161161 }
162- conn = client .connection = _Connection (data )
162+ conn = client ._connection = _Connection (data )
163163
164164 result = client .detect_language (value )
165165 self .assertEqual (result , detection )
@@ -199,7 +199,7 @@ def test_detect_language_multiple_values(self):
199199 ],
200200 },
201201 }
202- conn = client .connection = _Connection (data )
202+ conn = client ._connection = _Connection (data )
203203
204204 result = client .detect_language ([value1 , value2 ])
205205 self .assertEqual (result , [detection1 , detection2 ])
@@ -236,15 +236,15 @@ def test_detect_language_multiple_results(self):
236236 'detections' : [[detection1 , detection2 ]],
237237 },
238238 }
239- client .connection = _Connection (data )
239+ client ._connection = _Connection (data )
240240
241241 with self .assertRaises (ValueError ):
242242 client .detect_language (value )
243243
244244 def test_translate_bad_result (self ):
245245 client = self ._make_one (self .KEY )
246246 value = 'hvala ti'
247- conn = client .connection = _Connection ({})
247+ conn = client ._connection = _Connection ({})
248248
249249 with self .assertRaises (ValueError ):
250250 client .translate (value )
@@ -274,7 +274,7 @@ def test_translate_defaults(self):
274274 'translations' : [translation ],
275275 },
276276 }
277- conn = client .connection = _Connection (data )
277+ conn = client ._connection = _Connection (data )
278278
279279 result = client .translate (value )
280280 self .assertEqual (result , translation )
@@ -310,7 +310,7 @@ def test_translate_multiple(self):
310310 'translations' : [translation1 , translation2 ],
311311 },
312312 }
313- conn = client .connection = _Connection (data )
313+ conn = client ._connection = _Connection (data )
314314
315315 result = client .translate ([value1 , value2 ])
316316 self .assertEqual (result , [translation1 , translation2 ])
@@ -342,7 +342,7 @@ def test_translate_explicit(self):
342342 'translations' : [translation ],
343343 },
344344 }
345- conn = client .connection = _Connection (data )
345+ conn = client ._connection = _Connection (data )
346346
347347 cid = '123'
348348 format_ = 'text'
0 commit comments