diff --git a/scenario/mocking.py b/scenario/mocking.py index 38d95b28..df074bc1 100644 --- a/scenario/mocking.py +++ b/scenario/mocking.py @@ -632,7 +632,7 @@ def resource_get(self, resource_name: str) -> str: ) def credential_get(self) -> CloudSpec: - if not self._cloud_spec: + if not self._state.cloud_spec: raise ModelError( "ERROR cloud spec is empty, initialise it with `scenario.State(cloud_spec=...)`", )