Skip to content

Commit 61234a3

Browse files
authored
Clean tests (#3130)
* Remove pointless import * Remove unused file
1 parent bd8c204 commit 61234a3

File tree

4 files changed

+10
-136
lines changed

4 files changed

+10
-136
lines changed

azure-common/testutils/create_credentials_file.py

-123
This file was deleted.

azure-mgmt-billing/tests/test_mgmt_billing.py

+8-9
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
import unittest
99

1010
import azure.mgmt.billing
11-
from testutils.common_recordingtestcase import record
1211
from devtools_testutils import AzureMgmtTestCase
1312

1413
class MgmtBillingTest(AzureMgmtTestCase):
@@ -25,7 +24,7 @@ def _validate_invoice(self, invoice, url_generated=False):
2524
self.assertIsNotNone(invoice.download_url.expiry_time)
2625
else:
2726
self.assertIsNone(invoice.download_url)
28-
27+
2928
def _validate_billing_period(self, billing_period):
3029
self.assertIsNotNone(billing_period)
3130
self.assertIsNotNone(billing_period.id)
@@ -44,41 +43,41 @@ def test_billing_enrollment_accounts_list(self):
4443
def test_billing_invoice_latest(self):
4544
output = self.billing_client.invoices.get_latest()
4645
self._validate_invoice(output, url_generated=True)
47-
46+
4847
def test_billing_invoice_list_get(self):
4948
output = list(self.billing_client.invoices.list())
5049
self.assertTrue(len(output) > 0)
5150
self._validate_invoice(output[0], url_generated=False)
5251
invoice = self.billing_client.invoices.get(output[0].name)
5352
self._validate_invoice(invoice, url_generated=True)
54-
53+
5554
def test_billing_invoice_list_generate_url(self):
5655
output = list(self.billing_client.invoices.list(expand='downloadUrl'))
5756
self.assertTrue(len(output) > 0)
5857
self._validate_invoice(output[0], url_generated=True)
59-
58+
6059
def test_billing_invoice_list_top(self):
6160
output = list(self.billing_client.invoices.list(expand='downloadUrl', top=1))
6261
self.assertEqual(1, len(output))
6362
self._validate_invoice(output[0], url_generated=True)
64-
63+
6564
def test_billing_invoice_list_filter(self):
6665
output = list(self.billing_client.invoices.list(filter='invoicePeriodEndDate gt 2017-02-01'))
6766
self.assertTrue(len(output) > 0)
6867
self._validate_invoice(output[0], url_generated=False)
69-
68+
7069
def test_billing_period_list_get(self):
7170
output = list(self.billing_client.billing_periods.list())
7271
self.assertTrue(len(output) > 0)
7372
self._validate_billing_period(output[0])
7473
billing_period = self.billing_client.billing_periods.get(output[0].name)
7574
self._validate_billing_period(billing_period)
76-
75+
7776
def test_billing_period_list_top(self):
7877
output = list(self.billing_client.billing_periods.list(top=1))
7978
self.assertEqual(1, len(output))
8079
self._validate_billing_period(output[0])
81-
80+
8281
def test_billing_period_list_filter(self):
8382
output = list(self.billing_client.billing_periods.list(filter='billingPeriodEndDate gt 2017-02-01'))
8483
self.assertTrue(len(output) > 0)

azure-mgmt-network/tests/test_mgmt_network.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
import unittest
99

1010
import azure.mgmt.network.models
11-
from testutils.common_recordingtestcase import record
1211
from devtools_testutils import (
1312
AzureMgmtTestCase,
1413
ResourceGroupPreparer,
@@ -70,7 +69,7 @@ def test_network_interface_card(self, resource_group, location):
7069
resource_group.name,
7170
nic_info.name
7271
)
73-
72+
7473
nics = list(self.network_client.network_interfaces.list(
7574
resource_group.name
7675
))
@@ -637,7 +636,7 @@ def test_express_route_circuit(self, resource_group, location):
637636
'AzurePublicPeering',
638637
{
639638
"peering_type": "AzurePublicPeering",
640-
"peer_asn": 100,
639+
"peer_asn": 100,
641640
"primary_peer_address_prefix": "192.168.1.0/30",
642641
"secondary_peer_address_prefix": "192.168.2.0/30",
643642
"vlan_id": 200,

azure-mgmt-subscription/tests/test_mgmt_subscription.py

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
import azure.mgmt.billing
1111
import azure.mgmt.subscription
12-
from testutils.common_recordingtestcase import record
1312
from devtools_testutils import AzureMgmtTestCase
1413

1514
class MgmtSubscriptionTest(AzureMgmtTestCase):

0 commit comments

Comments
 (0)