Skip to content

Commit

Permalink
add unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
cgoodfred committed Dec 6, 2023
1 parent 2f43b26 commit 1efbca1
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/test_azure_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,19 @@ def test_get_location(self):
location = generator._get_location()
self.assertIn("US East", location)

def test_get_additional_info(self):
"""Test the _get_additional_info method."""
two_hours_ago = (self.now - self.one_hour) - self.one_hour
generator = TestGenerator(two_hours_ago, self.now, self.currency, self.account_info)
add_info = generator._get_additional_info()
self.assertIsInstance(add_info, tuple)

attributes = {}
attributes["additional_info"] = {"VCPU": "1"}
generator = TestGenerator(two_hours_ago, self.now, self.currency, self.account_info, attributes)
add_info = generator._get_additional_info
self.assertIn("VCPU", add_info)


class AzureGeneratorTestCase(TestCase):
"""Test Base for specific generator classes."""
Expand Down

0 comments on commit 1efbca1

Please sign in to comment.