Skip to content
This repository was archived by the owner on Nov 9, 2023. It is now read-only.
This repository was archived by the owner on Nov 9, 2023. It is now read-only.

make test error : TypeError: '>' not supported between instances of 'NoneType' and 'int' #5

@huang3eng

Description

@huang3eng

================================================================================= FAILURES =================================================================================
_____________________________________________________________________________ test_api_process _____________________________________________________________________________

client = <FlaskClient <Flask 'app'>>

def test_api_process(client):
    resp = client.get("/api/process")

    assert resp.status_code == 200
    assert resp.headers["Content-Type"] == "application/json"
    resp_payload = json.loads(resp.data)
    assert len(resp_payload["processes"]) > 0
  assert resp_payload["processes"][0]["memory_percent"] > 0

E TypeError: '>' not supported between instances of 'NoneType' and 'int'

src/app/tests/test_api.py:12: TypeError
========================================================================= short test summary info ==========================================================================
FAILED src/app/tests/test_api.py::test_api_process - TypeError: '>' not supported between instances of 'NoneType' and 'int'
======================================================================= 1 failed, 4 passed in 3.21s ========================================================================
make: *** [test] Error 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions