1
0
Fork 0

Add test for expected output

This commit is contained in:
Stuart Quin 2015-01-07 10:30:48 +00:00 committed by Amjith Ramanujam
parent 5684048255
commit decb370f88
1 changed files with 14 additions and 0 deletions

14
tests/test_expanded.py Normal file
View File

@ -0,0 +1,14 @@
from pgcli.packages.expanded import expanded_table
import pytest
def test_expanded_table_renders():
input = [("hello", 123),("world", 456)]
expected = """-[ RECORD 0 ]
name | hello
age | 123
-[ RECORD 1 ]
name | world
age | 456
"""
assert expected == expanded_table(input, ["name", "age"])