diff --git a/nise/__init__.py b/nise/__init__.py index ea060b08..efdf1871 100644 --- a/nise/__init__.py +++ b/nise/__init__.py @@ -1,3 +1,3 @@ -__version__ = "4.6.0" +__version__ = "4.6.1" VERSION = __version__.split(".") diff --git a/nise/generators/aws/data_transfer_generator.py b/nise/generators/aws/data_transfer_generator.py index ecd2a7ff..3753e454 100644 --- a/nise/generators/aws/data_transfer_generator.py +++ b/nise/generators/aws/data_transfer_generator.py @@ -43,7 +43,7 @@ def __init__(self, start_date, end_date, currency, payer_account, usage_accounts self._product_name = self.attributes.get("product_name", "Amazon Elastic Compute Cloud") self._product_sku = self.attributes.get("product_sku") self._rate = float(self.attributes.get("rate", 0)) or None - self._resource_id = self.attributes.get("resource_id") + self._resource_id = f"i-{self.attributes.get('resource_id', self.fake.ean8())}" self._saving = float(self.attributes.get("saving", 0)) or None self._tags = self.attributes.get("tags", self._tags) diff --git a/tests/test_aws_generator.py b/tests/test_aws_generator.py index 83a8d1e3..48d0b259 100644 --- a/tests/test_aws_generator.py +++ b/tests/test_aws_generator.py @@ -311,7 +311,7 @@ def test_init_with_attributes(self): ) self.assertEqual(generator._product_code, self.product_code) self.assertEqual(generator._tags, self.tags) - self.assertEqual(generator._resource_id, self.resource_id) + self.assertEqual(generator._resource_id, f"i-{self.resource_id}") self.assertEqual(generator._amount, self.amount) self.assertEqual(generator._rate, self.rate)