Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Internal test for security fails #831

Closed
LysandreJik opened this issue Apr 11, 2022 · 4 comments · Fixed by #834
Closed

Internal test for security fails #831

LysandreJik opened this issue Apr 11, 2022 · 4 comments · Fixed by #834

Comments

@LysandreJik
Copy link
Member

The test_model_info_with_security test currently fails with the following stacktrace:

    @with_production_testing
    def test_model_info_with_security(self):
        _api = HfApi()
        model = _api.model_info(
            repo_id=DUMMY_MODEL_ID,
            revision=DUMMY_MODEL_ID_REVISION_ONE_SPECIFIC_COMMIT,
            securityStatus=True,
        )
        self.assertEqual(
            getattr(model, "securityStatus"),
>           {"containsInfected": False, "infectionTypes": []},
        )
E       AssertionError: {'containsInfected': False} != {'containsInfected': False, 'infectionTypes': []}
E       - {'containsInfected': False}
E       + {'containsInfected': False, 'infectionTypes': []}

cc @McPatate

@julien-c
Copy link
Member

Yes, @McPatate can confirm but I think the tests here should be updated because we don't expect the API to return infectionTypes anymore

@osanseviero
Copy link
Contributor

Also related

@julien-c
Copy link
Member

Those other issues should be solved now, I think.

@McPatate do you want to open a PR in this repo to remove infectionTypes from the tests?

@McPatate
Copy link
Member

Sure !

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants
@julien-c @osanseviero @McPatate @LysandreJik and others