MCPcopy Create free account
hub / github.com/aws/aws-cli / session_conn

Function session_conn

tests/functional/test_telemetry.py:35–60  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

33
34@pytest.fixture
35def session_conn():
36 conn = CLISessionDatabaseConnection(
37 connection=sqlite3.connect(
38 # Use an in-memory db for testing.
39 ':memory:',
40 check_same_thread=False,
41 isolation_level=None,
42 ),
43 )
44 # Write an initial record.
45 conn.execute(
46 """
47 INSERT OR REPLACE INTO session (
48 key, session_id, timestamp
49 ) VALUES ('first_key', 'first_id', 5555555555)
50 """
51 )
52 # Overwrite host id with deterministic value for testing.
53 conn.execute(
54 """
55 INSERT OR REPLACE INTO host_id (
56 key, id
57 ) VALUES (0, 'my-hostname')
58 """
59 )
60 return conn
61
62
63@pytest.fixture

Callers

nothing calls this directly

Calls 3

executeMethod · 0.95
connectMethod · 0.45

Tested by

no test coverage detected