def test_some(self): guid = '{2fa4ed95-0317-4c6a-a74c-5f3e3912c1f9}' CompatReport.objects.create( guid=guid, works_properly=True, app_multiprocess_enabled=True, multiprocess_compatible=True) CompatReport.objects.create( guid=guid, works_properly=True, app_multiprocess_enabled=False, multiprocess_compatible=True) CompatReport.objects.create( guid=guid, works_properly=False, app_multiprocess_enabled=False, multiprocess_compatible=True) CompatReport.objects.create( guid='ballin', works_properly=True, app_multiprocess_enabled=True, multiprocess_compatible=True) CompatReport.objects.create( guid='ballin', works_properly=False, app_multiprocess_enabled=True, multiprocess_compatible=True) assert CompatReport.get_counts(guid) == {'success': 2, 'failure': 1}
def test_some(self): guid = '{2fa4ed95-0317-4c6a-a74c-5f3e3912c1f9}' CompatReport.objects.create(guid=guid, works_properly=True) CompatReport.objects.create(guid=guid, works_properly=True) CompatReport.objects.create(guid=guid, works_properly=False) CompatReport.objects.create(guid='ballin', works_properly=True) CompatReport.objects.create(guid='ballin', works_properly=False) eq_(CompatReport.get_counts(guid), {'success': 2, 'failure': 1})
def test_none(self): assert CompatReport.get_counts('xxx') == {'success': 0, 'failure': 0}
def test_none(self): eq_(CompatReport.get_counts('xxx'), {'success': 0, 'failure': 0})
def get_compat_counts(addon): """Get counts for add-on compatibility reports.""" return CompatReport.get_counts(addon.guid)
def test_none(self): assert CompatReport.get_counts("xxx") == {"success": 0, "failure": 0}