Skip to content

Commit

Permalink
Deprecation warnings (#4136)
Browse files Browse the repository at this point in the history
* assertEqual

* Packaging update of azure-cognitiveservices-language-textanalytics

* Packaging update of azure-mgmt-web

* Packaging update of azure-mgmt-search

* Packaging update of azure-cognitiveservices-vision-face

* Packaging update of azure-cognitiveservices-language-spellcheck

* Packaging update of azure-mgmt-batchai

* Update sdk_packaging.toml

* Update sdk_packaging.toml

* Packaging update of azure-cognitiveservices-language-spellcheck

* Packaging update of azure-cognitiveservices-language-textanalytics

* Update sdk_packaging.toml

* Packaging update of azure-cognitiveservices-vision-face

* Update test_mgmt_containerservice.py
  • Loading branch information
lmazuel authored Jan 9, 2019
1 parent a242323 commit 923926c
Show file tree
Hide file tree
Showing 16 changed files with 41 additions and 24 deletions.
4 changes: 4 additions & 0 deletions azure-cognitiveservices-language-spellcheck/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
include *.rst
include azure/__init__.py
include azure/cognitiveservices/__init__.py
include azure/cognitiveservices/language/__init__.py

Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ package_pprint_name = "Cognitive Services Spellcheck"
package_doc_id = "cognitive-services"
is_stable = true
is_arm = false
need_msrestazure = false
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ def test_spell_check(self):
response = text_analytics.spell_checker(
"cognituve services"
)
self.assertEquals(response.flagged_tokens[0].token, "cognituve")
self.assertEquals(response.flagged_tokens[0].suggestions[0].suggestion, "cognitive")
self.assertEqual(response.flagged_tokens[0].token, "cognituve")
self.assertEqual(response.flagged_tokens[0].suggestions[0].suggestion, "cognitive")



4 changes: 4 additions & 0 deletions azure-cognitiveservices-language-textanalytics/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
include *.rst
include azure/__init__.py
include azure/cognitiveservices/__init__.py
include azure/cognitiveservices/language/__init__.py

Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ package_pprint_name = "Cognitive Services Text Analytics"
package_doc_id = "cognitive-services"
is_stable = false
is_arm = false
need_msrestazure = false
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,6 @@ def test_detect_language(self):
}]
)

self.assertEquals(response.documents[0].detected_languages[0].name, "English")
self.assertEqual(response.documents[0].detected_languages[0].name, "English")


6 changes: 3 additions & 3 deletions azure-cognitiveservices-vision-face/tests/test_face.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,6 @@ def test_face_detect(self):
)

detected = result[0]
self.assertEquals(detected.face_attributes.age, 52.4)
self.assertEquals(detected.face_attributes.gender, Gender.female)
self.assertEquals(detected.face_attributes.emotion.happiness, 1.0)
self.assertEqual(detected.face_attributes.age, 52.4)
self.assertEqual(detected.face_attributes.gender, Gender.female)
self.assertEqual(detected.face_attributes.emotion.happiness, 1.0)
3 changes: 3 additions & 0 deletions azure-mgmt-batchai/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
include *.rst
include azure/__init__.py
include azure/mgmt/__init__.py

4 changes: 2 additions & 2 deletions azure-mgmt-batchai/tests/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ def assert_job_files_in_path_are(test, client, resource_group, job_name, output_
if f.file_type == models.FileType.file:
v = requests.get(f.download_url).content
actual[f.name] = v if isinstance(v, six.string_types) else v.decode()
test.assertEquals(sorted(actual.keys()), sorted(expected.keys()))
test.assertEqual(sorted(actual.keys()), sorted(expected.keys()))
for k, v in expected.items():
a = actual[k]
if a is None and v is None:
Expand All @@ -396,7 +396,7 @@ def assert_job_files_in_path_are(test, client, resource_group, job_name, output_
if a is None:
test.fail('Expected {0} to be a file, got a directory'.format(k))
if isinstance(v, six.string_types):
test.assertEquals(v, a, k + "expected {0} got {1}".format(v, a))
test.assertEqual(v, a, k + "expected {0} got {1}".format(v, a))
else:
test.assertRegexpMatches(actual.get(k), v, k)
if output_directory_id == Helpers.STANDARD_OUTPUT_DIRECTORY_ID and not execution_log_found:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ def setUp(self):
def test_container(self, resource_group, location):
container_name = self.get_resource_name('pycontainer')

# https://msdn.microsoft.com/en-us/library/azure/mt711471.aspx
async_create = self.cs_client.container_services.create_or_update(
resource_group.name,
container_name,
Expand Down Expand Up @@ -53,7 +52,6 @@ def test_container(self, resource_group, location):
}
},
},
retries=0
)
container = async_create.result()

Expand Down
2 changes: 1 addition & 1 deletion azure-mgmt-network/tests/test_mgmt_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -685,7 +685,7 @@ def test_virtual_network_gateway_operations(self, resource_group, location):
gw_params
)
vng = async_create.result()
self.assertEquals(vng.name, vng_name)
self.assertEqual(vng.name, vng_name)


#------------------------------------------------------------------------------
Expand Down
3 changes: 3 additions & 0 deletions azure-mgmt-search/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
include *.rst
include azure/__init__.py
include azure/mgmt/__init__.py

18 changes: 9 additions & 9 deletions azure-mgmt-search/tests/test_mgmt_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,22 +42,22 @@ def test_search_services(self, resource_group, location):

availability = self.client.services.check_name_availability(account_name)
self.assertFalse(availability.is_name_available)
self.assertEquals(availability.reason, "AlreadyExists")
self.assertEqual(availability.reason, "AlreadyExists")

service = self.client.services.get(
resource_group.name,
service.name
)
self.assertEquals(service.name, account_name)
self.assertEqual(service.name, account_name)

services = list(self.client.services.list_by_resource_group(resource_group.name))
self.assertEquals(len(services), 1)
self.assertEquals(services[0].name, account_name)
self.assertEqual(len(services), 1)
self.assertEqual(services[0].name, account_name)

self.client.services.delete(
resource_group.name,
service.name
)
)

@ResourceGroupPreparer()
def test_search_query_keys(self, resource_group, location):
Expand All @@ -83,15 +83,15 @@ def test_search_query_keys(self, resource_group, location):
account_name,
key_name,
)
self.assertEquals(key.name, key_name)
self.assertEqual(key.name, key_name)

keys = list(self.client.query_keys.list_by_search_service(
resource_group.name,
account_name
))
self.assertEquals(len(keys), 2) # default key and mine
self.assertEqual(len(keys), 2) # default key and mine
self.assertIsNone(keys[0].name)
self.assertEquals(keys[1].name, key_name)
self.assertEqual(keys[1].name, key_name)

self.client.query_keys.delete(
resource_group.name,
Expand Down Expand Up @@ -130,7 +130,7 @@ def test_search_admin_keys(self, resource_group, location):
'primary'
)
self.assertIsNotNone(regenerated_admin_keys.primary_key)
self.assertEquals(admin_keys.secondary_key, regenerated_admin_keys.secondary_key)
self.assertEqual(admin_keys.secondary_key, regenerated_admin_keys.secondary_key)

#------------------------------------------------------------------------------
if __name__ == '__main__':
Expand Down
6 changes: 3 additions & 3 deletions azure-mgmt-sql/tests/test_mgmt_sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,9 @@ def test_server(self, resource_group, location):
"123.123.123.123",
"123.123.123.124"
)
self.assertEquals(firewall_rule.name, firewall_rule_name)
self.assertEquals(firewall_rule.start_ip_address, "123.123.123.123")
self.assertEquals(firewall_rule.end_ip_address, "123.123.123.124")
self.assertEqual(firewall_rule.name, firewall_rule_name)
self.assertEqual(firewall_rule.start_ip_address, "123.123.123.123")
self.assertEqual(firewall_rule.end_ip_address, "123.123.123.124")

self.client.servers.delete(resource_group.name, server_name, polling=False)

Expand Down
3 changes: 3 additions & 0 deletions azure-mgmt-web/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
include *.rst
include azure/__init__.py
include azure/mgmt/__init__.py

2 changes: 1 addition & 1 deletion azure-mgmt-web/tests/test_mgmt_web.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def test_webapp(self, resource_group, location):
)
)
site = site_async_operation.result()
self.assertEquals(site.name, site_name)
self.assertEqual(site.name, site_name)

# List Sites by Resource Group
for site in self.web_client.sites.get_sites(self.group_name):
Expand Down

0 comments on commit 923926c

Please sign in to comment.