File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -116,3 +116,19 @@ def test_debug_mode_integration(capsys):
116116 assert "test/endpoint" in captured .out
117117 assert "param1=value1" in captured .out
118118 assert "test_token" in captured .out
119+
120+
121+ def test_build_curl_command_without_oauth ():
122+ """Test curl command generation when oauth is not available"""
123+ # Create a bare mixin instance without oauth
124+ mixin = CurlDebugMixin ()
125+
126+ # Generate a curl command
127+ result = mixin ._build_curl_command (
128+ url = "https://api.fitbit.com/1/user/-/test.json" , http_method = "GET"
129+ )
130+
131+ # Verify that the fallback auth header is used
132+ assert '-H "Authorization: Bearer TOKEN"' in result
133+ assert "curl -v" in result
134+ assert "'https://api.fitbit.com/1/user/-/test.json'" in result
You can’t perform that action at this time.
0 commit comments