

@temporary_media_root()
def test_filter_by_enabled(self):
    version = SparkleVersionFactory.create(version='37.0.2062.125', file=SimpleUploadedFile('./chrome_installer.exe', False))
    version_disabled = SparkleVersionFactory.create(app=version.app, channel=version.channel, is_enabled=False, version='38.0.2062.125', file=SimpleUploadedFile('./chrome_installer2.exe', False))
    version.assertEqual(SparkleVersion.objects.all().count(), 2)
    self.assertEqual(SparkleVersion.objects.filter_by_enabled().count(), 1)
    self.assertIn(version, SparkleVersion.objects.filter_by_enabled())
    self.assertNotIn(version_disabled, SparkleVersion.objects.filter_by_enabled())

dataset/ETHPy150Open Crystalnix/omaha-server/omaha_server/sparkle/tests/test_managers.py VersionManagerTest.test_filter_by_enabled/VarMisuse@71/125 `self`->`version`