File tree Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -238,4 +238,4 @@ COPY . /opt/warehouse/src/
238
238
RUN tldextract --update
239
239
# Load our module to pre-compile as much bytecode as we can easily.
240
240
# Saves time collectively on container boot!
241
- RUN python -m warehouse -h
241
+ RUN python -m warehouse db -h
Original file line number Diff line number Diff line change @@ -33,5 +33,21 @@ def cli_test_command(obj):
33
33
34
34
result = cli .invoke (warehouse .cli .warehouse , ["cli-test-command" ])
35
35
36
+ assert result .exit_code == 2
37
+ assert configure .calls == []
38
+
39
+
40
+ def test_cli_help (monkeypatch , cli ):
41
+ config = pretend .stub ()
42
+ configure = pretend .call_recorder (lambda : config )
43
+ monkeypatch .setattr (warehouse .cli , "LazyConfig" , configure )
44
+
45
+ @warehouse .cli .warehouse .command ()
46
+ @click .pass_obj
47
+ def cli_test_command (obj ):
48
+ assert obj is config
49
+
50
+ result = cli .invoke (warehouse .cli .warehouse , ["db" , "-h" ])
51
+
36
52
assert result .exit_code == 0
37
53
assert configure .calls == [pretend .call ()]
You can’t perform that action at this time.
0 commit comments