'Test `get_manifest_json` gets the right version.'

def test_get_manifest_json_multiple_versions(self):

    webapp = self.post_addon()
    webapp.update(status=mkt.STATUS_PUBLIC)
    latest_version = webapp.latest_version
    latest_version.files.update(status=mkt.STATUS_PUBLIC)
    version = version_factory(addon=webapp, version='0.5', created=self.days_ago(1), file_kw={'status': mkt.STATUS_PENDING})
    version.files.update(created=self.days_ago(1))
    webapp = Webapp.objects.get(pk=webapp.pk)
    eq_(webapp.current_version, latest_version)
    assert webapp.current_version.has_files
    mf = self._get_manifest_json()
    eq_(webapp.get_manifest_json(), mf)
