diff options
author | zlg <zlg@zlg.space> | 2018-10-06 22:28:40 -0700 |
---|---|---|
committer | zlg <zlg@zlg.space> | 2018-10-06 22:28:40 -0700 |
commit | 9da20483b8aa26a3090093212d007e6dc756b2d2 (patch) | |
tree | af58054f45cff31871109c4a7591d8329cd07686 /src/vgstash | |
parent | Remove ID field from DB (diff) | |
download | vgstash-9da20483b8aa26a3090093212d007e6dc756b2d2.tar.gz vgstash-9da20483b8aa26a3090093212d007e6dc756b2d2.tar.bz2 vgstash-9da20483b8aa26a3090093212d007e6dc756b2d2.tar.xz vgstash-9da20483b8aa26a3090093212d007e6dc756b2d2.zip |
cli: Add "delete" command
Unlike the old version of vgstash, the new one does not accept row IDs
as arguments for removal. Instead, it accepts two mandatory arguments:
the title of the game, and the system it's on. This is in line with the
database itself, using the title and system as primary keys.
Diffstat (limited to 'src/vgstash')
-rw-r--r-- | src/vgstash/test_vgstash_cli.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/vgstash/test_vgstash_cli.py b/src/vgstash/test_vgstash_cli.py index faf87b2..cbbd151 100644 --- a/src/vgstash/test_vgstash_cli.py +++ b/src/vgstash/test_vgstash_cli.py @@ -142,3 +142,12 @@ def test_list_pretty_tiny(): 'Super Mario Bros. | NES | P | P ', 'The Legend of Zelda | NES | D | P \n' )) + + +def test_delete(): + runner = CliRunner() + result = runner.invoke(vgstash_cli.cli, ['delete', 'Vectorman 2', 'Genesis']) + if verbose: + print(result.output) + assert result.exit_code == 0 + assert result.output == "Removed Vectorman 2 for Genesis from your collection.\n" |