def test_codes_by_feature(): tarallo_session = Tarallo(t_url, t_token) codes = tarallo_session.get_codes_by_feature("model", "S667ABC256") assert isinstance(codes, Iterable) # noinspection PyTypeChecker assert len(codes) > 0 # These are all motherboards for code in codes: assert isinstance(code, str) assert code.startswith('R') assert code[1:].isdigit()
def test_codes_by_feature_invalid_feature(): tarallo_session = Tarallo(t_url, t_token) # Cannot do an exact match on float/double values tarallo_session.get_codes_by_feature("psu-vol", "17.3")
def test_codes_by_feature_invalid_feature(): tarallo_session = Tarallo(t_url, t_token) tarallo_session.get_codes_by_feature("invalid-feature", "test")
def test_codes_by_feature_none(): tarallo_session = Tarallo(t_url, t_token) codes = tarallo_session.get_codes_by_feature( "sn", "invalid-serial-number-doesnt-exist") assert len(codes) == 0