Skip to content

Commit

Permalink
tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tehcoderer committed May 11, 2023
1 parent 554e0f5 commit 5463249
Show file tree
Hide file tree
Showing 7 changed files with 55,323 additions and 26,918 deletions.
2,719 changes: 1,812 additions & 907 deletions tests/openbb_terminal/economy/cassettes/test_commodity_model/test_get_debt.yaml

Large diffs are not rendered by default.

10 changes: 8 additions & 2 deletions tests/openbb_terminal/session/test_routines_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,9 @@ def test_read_routine(mocker, test_user):
current_user.preferences.USER_ROUTINES_DIRECTORY
/ "hub"
/ "personal"
/ file_name
/ file_name,
encoding="utf-8",
newline="\n",
)


Expand Down Expand Up @@ -113,7 +115,9 @@ def test_read_routine_exception(mocker, test_user):
)
relpath_mock.assert_not_called()
open_mock.assert_called_with(
current_user.preferences.USER_ROUTINES_DIRECTORY / file_name
current_user.preferences.USER_ROUTINES_DIRECTORY / file_name,
encoding="utf-8",
newline="\n",
)


Expand Down Expand Up @@ -161,6 +165,8 @@ def test_save_routine(mocker, exists: bool, test_user):
/ "personal"
/ file_name,
"w",
encoding="utf-8",
newline="\n",
)

assert exists_mock.call_count == 2
Expand Down
Original file line number Diff line number Diff line change
@@ -1,70 +1,138 @@
interactions:
- request:
body: null
headers:
Accept:
- '*/*'
Accept-Encoding:
- gzip, deflate
Connection:
- keep-alive
method: GET
uri: https://www.alphavantage.co/query?apikey=MOCK_API_KEY&function=OVERVIEW&symbol=TSLA
response:
body:
string: !!binary |
H4sIAAAAAAAAA3RU227jNhB9368YBGi7CyiCLrbi9E2xtVljk9hrKVnkkZYmEhuKVEnKqVr03wtS
tyS71YuAOWdmzlw4/3wAADhLu/oo2NnvcJalN/GZ01tjpVBnXYMGWIu6FhxSLfLnkXBHaotlqBiB
Lc9HYIMql7TRVPAJdwzBBaqAcIhrlDQnHJBhriXN4YQVzRkC4QXkDA3EUZYd5KJuCO/gSBQWQDns
CRMQMy0cWBNGn4TklLhgk/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t1oXkrUxBpdzwtH4zL4jvj8hZaV7au/cKOLt9iN
eLECPN+dF3zpbUh3K06Ul/EJzd0a++NPsw+8n5IC78JdTPnt8qpdq5UmvKC87GVEl8t3G9C/jA3R
/aUTHOcL+FP0w7//AQAA//8DADfjiKm7CAAA
headers:
Allow:
- GET, HEAD, OPTIONS
CF-Cache-Status:
- DYNAMIC
CF-RAY:
- 7c557dc73aff2cb1-DFW
Connection:
- keep-alive
Content-Encoding:
- gzip
Content-Type:
- application/json
Cross-Origin-Opener-Policy:
- same-origin
Date:
- Wed, 10 May 2023 22:06:46 GMT
Referrer-Policy:
- same-origin
Server:
- cloudflare
Transfer-Encoding:
- chunked
Vary:
- Cookie, Origin
Via:
- 1.1 vegur
X-Content-Type-Options:
- nosniff
X-Frame-Options:
- DENY
status:
code: 200
message: OK
version: 1
interactions:
- request:
body: null
headers:
Accept:
- '*/*'
Accept-Encoding:
- gzip, deflate
Connection:
- keep-alive
method: GET
uri: https://www.alphavantage.co/query?apikey=MOCK_API_KEY&function=OVERVIEW&symbol=TSLA
response:
body:
string: !!binary |
H4sIAAAAAAAAA3RU227jNhB9368YBGi7CyiCLrbi9E2xtVljk9hrKVnkkZYmEhuKVEnKqVr03wtS
tyS71YuAOWdmzlw4/3wAADhLu/oo2NnvcJalN/GZ01tjpVBnXYMGWIu6FhxSLfLnkXBHaotlqBiB
Lc9HYIMql7TRVPAJdwzBBaqAcIhrlDQnHJBhriXN4YQVzRkC4QXkDA3EUZYd5KJuCO/gSBQWQDns
CRMQMy0cWBNGn4TklLhgk/ymIG+lRK6hkaJoc62A8py1Bc6pciKVA0eiNcpuTKO0kKREeJKihkrU
CFpAKWlxrnLC0AElGJHQEI5MWZW9QQrxBJoyVA4QBS/ImPkLXaEEiYxoLGYt1g/lieaoXNhyCLzA
c3rtUJECdIVQ0bJCpUERhka+NTasLc8ptxEm6WNFDVEKeYnS1AYKyxq5Vg7kpNGtpLwEP/oFjNBX
kWoin1HDx5eK5tXYJTXBVXeUt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keep-alive
Content-Encoding:
- gzip
Content-Type:
- application/json
Cross-Origin-Opener-Policy:
- same-origin
Date:
- Wed, 10 May 2023 22:06:46 GMT
Referrer-Policy:
- same-origin
Server:
- cloudflare
Transfer-Encoding:
- chunked
Vary:
- Cookie, Origin
Via:
- 1.1 vegur
X-Content-Type-Options:
- nosniff
X-Frame-Options:
- DENY
status:
code: 200
message: OK
- request:
body: null
headers:
Accept:
- '*/*'
Accept-Encoding:
- gzip, deflate
Connection:
- keep-alive
method: GET
uri: https://www.alphavantage.co/query?apikey=MOCK_API_KEY&function=OVERVIEW&symbol=TSLA
response:
body:
string: !!binary |
H4sIAAAAAAAAA3RU227jNhB9368YBGi7CyiCLrbi9E2xtVljk9hrKVnkkZYmEhuKVEnKqVr03wtS
tyS71YuAOWdmzlw4/3wAADhLu/oo2NnvcJalN/GZ01tjpVBnXYMGWIu6FhxSLfLnkXBHaotlqBiB
Lc9HYIMql7TRVPAJdwzBBaqAcIhrlDQnHJBhriXN4YQVzRkC4QXkDA3EUZYd5KJuCO/gSBQWQDns
CRMQMy0cWBNGn4TklLhgk/ymIG+lRK6hkaJoc62A8py1Bc6pciKVA0eiNcpuTKO0kKREeJKihkrU
CFpAKWlxrnLC0AElGJHQEI5MWZW9QQrxBJoyVA4QBS/ImPkLXaEEiYxoLGYt1g/lieaoXNhyCLzA
c3rtUJECdIVQ0bJCpUERhka+NTasLc8ptxEm6WNFDVEKeYnS1AYKyxq5Vg7kpNGtpLwEP/oFjNBX
kWoin1HDx5eK5tXYJTXBVXeUtFCfbMYgnNyH5OdT8o9NK5HNaj4NkV3IKinasgKqFaj2qGhBieyG
ahPbd8fGHGdc4AmZaPo+mU2BmvwhJFCuNGEMpRExDKISWpwE04Tm4wxL8ydm60B1SmM9de+eUzOH
VBNtGv9agc3DlADBcayREVmaCZRMHAkD1TYNoyiVwf9nb4aEDrxQXUEI19+r1+yJ1oeyi2xm745P
Zr39ap6KH/qryFuO1uSvvCK8tK/sLk438beJb9c87wxyn24ms2i5loN1eskp5lpIY7yN7+4/x+vs
/rC9ux7hLS9aNXjd7rLdAR6SL9v1TZLCr7CP0zS5u04OsI4PcLXbbJN0uhBFIVEp4xcuPQ82iaEd
kuQrHDYO7OObHcQ32c6BdezA/eT3mZpH9YhEJrww3hvMsT6iHAk3Zk76W0ukRqs78ILw3AvPQ3+k
3NolW5OGasLo32Q8Nssw8gNvtVp6nje18WqbbWLb3yiKIs9+I7hPDsbZoItL92I5268nwHeD1ZT5
SojnB8JaOxV/6frRdPfoiRbIiz3KtCLSErz34CNFVrxBkn1qW+guRssBT8hbHONk2a1twoUbzvKk
eKL6lsiS2ro91w8vRnDX2IfAyx4f/D3XX6zmFLqVfMftlVczw1u8ZyR/tlR3EyNYvVM5IKvICxeX
lxevWnsthVK90LEEb7UM3/Z/Q1mrsUj26cB51YdhA1iXEMkpL9W1FC+6etw9GuK55wZh8AN3kPWG
6rnBYooac8I6pTPzyvVe0ryf5Mp3g2nImSSUUV7ukx8W47OQL0QWPRKs3FUwz4TmmInUHG67O0NF
kRst33HMEs3rFbiLKUjykImhhN534b+G5l0OLt1oXkrUxBpdzwtH4zL4jvj8hZaV7au/cKOLt9iN
eLECPN+dF3zpbUh3K06Ul/EJzd0a++NPsw+8n5IC78JdTPnt8qpdq5UmvKC87GVEl8t3G9C/jA3R
/aUTHOcL+FP0w7//AQAA//8DADfjiKm7CAAA
headers:
Allow:
- GET, HEAD, OPTIONS
CF-Cache-Status:
- DYNAMIC
CF-RAY:
- 7c56e4859f5e2ca0-DFW
Connection:
- keep-alive
Content-Encoding:
- gzip
Content-Type:
- application/json
Cross-Origin-Opener-Policy:
- same-origin
Date:
- Thu, 11 May 2023 02:11:41 GMT
Referrer-Policy:
- same-origin
Server:
- cloudflare
Transfer-Encoding:
- chunked
Vary:
- Cookie, Origin
Via:
- 1.1 vegur
X-Content-Type-Options:
- nosniff
X-Frame-Options:
- DENY
status:
code: 200
message: OK
version: 1
Loading

0 comments on commit 5463249

Please sign in to comment.