mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-07-29 04:14:32 +02:00
sqlite-utils memory --flatten, closes #332
This commit is contained in:
parent
13195d8747
commit
12b8c9de25
3 changed files with 29 additions and 1 deletions
|
|
@ -222,6 +222,30 @@ def test_memory_no_detect_types(option):
|
|||
]
|
||||
|
||||
|
||||
def test_memory_flatten():
|
||||
result = CliRunner().invoke(
|
||||
cli.cli,
|
||||
["memory", "-", "select * from stdin", "--flatten"],
|
||||
input=json.dumps(
|
||||
{
|
||||
"httpRequest": {
|
||||
"latency": "0.112114537s",
|
||||
"requestMethod": "GET",
|
||||
},
|
||||
"insertId": "6111722f000b5b4c4d4071e2",
|
||||
}
|
||||
),
|
||||
)
|
||||
assert result.exit_code == 0, result.output
|
||||
assert json.loads(result.output.strip()) == [
|
||||
{
|
||||
"httpRequest_latency": "0.112114537s",
|
||||
"httpRequest_requestMethod": "GET",
|
||||
"insertId": "6111722f000b5b4c4d4071e2",
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
def test_memory_analyze():
|
||||
result = CliRunner().invoke(
|
||||
cli.cli,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue