Commits

Branko Vukelic  committed 641c9cc

Fixed base endpoint tests

  • Participants
  • Parent commits cdd551c

Comments (0)

Files changed (1)

File tests/test_base_endpoints.py

         self.t.endpoint = 'Foo'
         self.assertEqual(
             self.t.get_endpoint_url(),
-            'http://api.microsofttranslator.com/v2/Http.svc/Foo'
+            'https://api.datamarket.azure.com/Bing/MicrosoftTranslator/v1/Foo'
         )
 
     def test_get_quoted_params(self):
-        self.t.params = {'foo': 'bar', 'bar': 1}
+        self.t.params = {'Foo': 'bar', 'Bar': 1}
         self.assertEqual(
             self.t.get_quoted_params(),
-            'foo=bar&bar=1'
+            'Foo=bar&Bar=1'
         )
 
     def test_get_full_url(self):
         self.t.endpoint = 'Translate'
-        self.t.params = {'text': 'foo'}
+        self.t.params = {'Text': 'foo'}
         self.assertEqual(
             self.t.get_request_url(),
-            'http://api.microsofttranslator.com/v2/Http.svc/Translate?text=foo'
+            'https://api.datamarket.azure.com/Bing/MicrosoftTranslator/v1/Translate?Text=foo'
         )
 
 
     def test_camelize(self):
         self.assertEqual(
             self.t.camelize_param('foo_bar'),
-            'fooBar'
+            'FooBar'
         )
 
         self.assertEqual(
             self.t.camelize_param('foo_bar_fam'),
-            'fooBarFam'
+            'FooBarFam'
         )
 
     def test_convert_kwargs(self):
         kw = dict(foo='bar', tfrom='test', fmt='bonus', fam_dam=1)
         self.t.convert_kwargs(kw),
-        self.assertEqual(self.t.params['foo'], 'bar')
-        self.assertEqual(self.t.params['from'], 'test')
-        self.assertEqual(self.t.params['format'], 'bonus')
-        self.assertEqual(self.t.params['famDam'], 1)
+        self.assertEqual(self.t.params['Foo'], 'bar')
+        self.assertEqual(self.t.params['From'], 'test')
+        self.assertEqual(self.t.params['Format'], 'bonus')
+        self.assertEqual(self.t.params['FamDam'], 1)
+