예제 #1
0
def report_entity():
    """Return a ReportEntity with 10 hosts."""
    deployment_report = DeploymentReportFactory.create(
        number_of_fingerprints=10)
    return ReportEntity.from_report_id(deployment_report.id)
예제 #2
0
 def test_create_with_defaults(self, patched_randint):
     """Test related fingerprint creation without default values."""
     DeploymentReportFactory.create()
     assert patched_randint.mock_calls == [mock.call(1, 5)]
     assert DeploymentsReport.objects.all().count() == 1
     assert SystemFingerprint.objects.all().count() == 1