Fix lib test

This commit is contained in:
Ivan Kravets
2021-07-30 20:13:53 +03:00
parent 19fa108f61
commit 76b46f59e9
2 changed files with 5 additions and 5 deletions

2
docs

Submodule docs updated: ef7532bd35...ed1ae77d1b

View File

@ -232,9 +232,9 @@ def test_global_lib_update_check(clirunner, validate_cliresult):
result = clirunner.invoke(cmd_lib, ["-g", "update", "--dry-run", "--json-output"]) result = clirunner.invoke(cmd_lib, ["-g", "update", "--dry-run", "--json-output"])
validate_cliresult(result) validate_cliresult(result)
output = json.loads(result.output) output = json.loads(result.output)
assert set(["Adafruit PN532", "ESPAsyncTCP", "NeoPixelBus"]) == set( assert set(
lib["name"] for lib in output ["Adafruit PN532", "AsyncMqttClient", "ESPAsyncTCP", "NeoPixelBus"]
) ) == set(lib["name"] for lib in output)
def test_global_lib_update(clirunner, validate_cliresult): def test_global_lib_update(clirunner, validate_cliresult):
@ -254,7 +254,7 @@ def test_global_lib_update(clirunner, validate_cliresult):
result = clirunner.invoke(cmd_lib, ["-g", "update"]) result = clirunner.invoke(cmd_lib, ["-g", "update"])
validate_cliresult(result) validate_cliresult(result)
assert result.output.count("[Detached]") == 1 assert result.output.count("[Detached]") == 1
assert result.output.count("[Up-to-date]") == 14 assert result.output.count("[Up-to-date]") == 13
# update unknown library # update unknown library
result = clirunner.invoke(cmd_lib, ["-g", "update", "Unknown"]) result = clirunner.invoke(cmd_lib, ["-g", "update", "Unknown"])