MCPcopy Create free account
hub / github.com/1jehuang/jcode / FakeEc2

Class FakeEc2

scripts/phone-server/test_wake_lambda.py:22–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20
21
22class FakeEc2:
23 def __init__(self, state="running"):
24 self.state = state
25 self.started = False
26
27 def describe_instances(self, **_kwargs):
28 return {"Reservations": [{"Instances": [{"State": {"Name": self.state}}]}]}
29
30 def start_instances(self, **_kwargs):
31 self.started = True
32
33
34class InvocationDoesNotExist(Exception):

Calls

no outgoing calls

Tested by 1