

def test_public_sparkle_update(self):
    ChannelFactory._meta.database = 'root'
    channel_name = 'test'
    channel = ChannelFactory(name=channel_name)
    app_name = 'SparrowTestApp'
    ApplicationFactory._meta.database = 'root'
    app = ApplicationFactory(name=app_name)
    file = SimpleUploadedFile('test.dmg', b'content')
    SparkleVersionFactory._meta.database = 'root'
    SparkleVersionFactory.create(channel=channel, app=app, file=file)
    url = ('%s%s' % (self.live_server_url, reverse('sparkle_appcast', kwargs=dict(app_name=app_name, channel=channel_name))))
    resp = requests.get(url)
    root = objectify.fromstring(resp.content)
    self.assertTrue((app_name in str(root.channel.item.title)))

dataset/ETHPy150Open Crystalnix/omaha-server/omaha_server/omaha/tests/test_public.py PublicTests.test_public_sparkle_update/original