Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean tests #3130

Merged
merged 2 commits into from
Aug 13, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
123 changes: 0 additions & 123 deletions azure-common/testutils/create_credentials_file.py

This file was deleted.

17 changes: 8 additions & 9 deletions azure-mgmt-billing/tests/test_mgmt_billing.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import unittest

import azure.mgmt.billing
from testutils.common_recordingtestcase import record
from devtools_testutils import AzureMgmtTestCase

class MgmtBillingTest(AzureMgmtTestCase):
Expand All @@ -25,7 +24,7 @@ def _validate_invoice(self, invoice, url_generated=False):
self.assertIsNotNone(invoice.download_url.expiry_time)
else:
self.assertIsNone(invoice.download_url)

def _validate_billing_period(self, billing_period):
self.assertIsNotNone(billing_period)
self.assertIsNotNone(billing_period.id)
Expand All @@ -44,41 +43,41 @@ def test_billing_enrollment_accounts_list(self):
def test_billing_invoice_latest(self):
output = self.billing_client.invoices.get_latest()
self._validate_invoice(output, url_generated=True)

def test_billing_invoice_list_get(self):
output = list(self.billing_client.invoices.list())
self.assertTrue(len(output) > 0)
self._validate_invoice(output[0], url_generated=False)
invoice = self.billing_client.invoices.get(output[0].name)
self._validate_invoice(invoice, url_generated=True)

def test_billing_invoice_list_generate_url(self):
output = list(self.billing_client.invoices.list(expand='downloadUrl'))
self.assertTrue(len(output) > 0)
self._validate_invoice(output[0], url_generated=True)

def test_billing_invoice_list_top(self):
output = list(self.billing_client.invoices.list(expand='downloadUrl', top=1))
self.assertEqual(1, len(output))
self._validate_invoice(output[0], url_generated=True)

def test_billing_invoice_list_filter(self):
output = list(self.billing_client.invoices.list(filter='invoicePeriodEndDate gt 2017-02-01'))
self.assertTrue(len(output) > 0)
self._validate_invoice(output[0], url_generated=False)

def test_billing_period_list_get(self):
output = list(self.billing_client.billing_periods.list())
self.assertTrue(len(output) > 0)
self._validate_billing_period(output[0])
billing_period = self.billing_client.billing_periods.get(output[0].name)
self._validate_billing_period(billing_period)

def test_billing_period_list_top(self):
output = list(self.billing_client.billing_periods.list(top=1))
self.assertEqual(1, len(output))
self._validate_billing_period(output[0])

def test_billing_period_list_filter(self):
output = list(self.billing_client.billing_periods.list(filter='billingPeriodEndDate gt 2017-02-01'))
self.assertTrue(len(output) > 0)
Expand Down
5 changes: 2 additions & 3 deletions azure-mgmt-network/tests/test_mgmt_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import unittest

import azure.mgmt.network.models
from testutils.common_recordingtestcase import record
from devtools_testutils import (
AzureMgmtTestCase,
ResourceGroupPreparer,
Expand Down Expand Up @@ -70,7 +69,7 @@ def test_network_interface_card(self, resource_group, location):
resource_group.name,
nic_info.name
)

nics = list(self.network_client.network_interfaces.list(
resource_group.name
))
Expand Down Expand Up @@ -637,7 +636,7 @@ def test_express_route_circuit(self, resource_group, location):
'AzurePublicPeering',
{
"peering_type": "AzurePublicPeering",
"peer_asn": 100,
"peer_asn": 100,
"primary_peer_address_prefix": "192.168.1.0/30",
"secondary_peer_address_prefix": "192.168.2.0/30",
"vlan_id": 200,
Expand Down
1 change: 0 additions & 1 deletion azure-mgmt-subscription/tests/test_mgmt_subscription.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

import azure.mgmt.billing
import azure.mgmt.subscription
from testutils.common_recordingtestcase import record
from devtools_testutils import AzureMgmtTestCase

class MgmtSubscriptionTest(AzureMgmtTestCase):
Expand Down