diff --git a/apps/addons/buttons.py b/apps/addons/buttons.py
index 21507ce3410..56541ed1a57 100644
--- a/apps/addons/buttons.py
+++ b/apps/addons/buttons.py
@@ -174,7 +174,7 @@ def links(self):
return rv
def file_details(self, file):
- platform = file.platform_id
+ platform = file.platform
if self.latest and (
self.addon.status == file.status == amo.STATUS_PUBLIC):
url = file.latest_xpi_url()
diff --git a/apps/addons/fixtures/addons/eula+contrib-addon.json b/apps/addons/fixtures/addons/eula+contrib-addon.json
index 99895ddfc54..dfba0ac46e3 100644
--- a/apps/addons/fixtures/addons/eula+contrib-addon.json
+++ b/apps/addons/fixtures/addons/eula+contrib-addon.json
@@ -84,14 +84,6 @@
"_current_version": 68776
}
},
- {
- "pk": 1,
- "model": "files.platform",
- "fields": {
- "modified": "2008-04-07 08:16:55",
- "created": "2007-03-05 13:09:27"
- }
- },
{
"pk": 68776,
"model": "versions.version",
diff --git a/apps/addons/fixtures/addons/invalid_latest_version.json b/apps/addons/fixtures/addons/invalid_latest_version.json
index 19eef5621a9..7f6d6d63c6f 100644
--- a/apps/addons/fixtures/addons/invalid_latest_version.json
+++ b/apps/addons/fixtures/addons/invalid_latest_version.json
@@ -58,14 +58,6 @@
"the_reason": null
}
},
- {
- "pk": 1,
- "model": "files.platform",
- "fields": {
- "modified": "2008-04-07 08:16:55",
- "created": "2007-03-05 13:09:27"
- }
- },
{
"pk": 98217,
"model": "versions.version",
@@ -78,22 +70,6 @@
"addon": 3895
}
},
- {
- "pk": 2,
- "model": "files.platform",
- "fields": {
- "modified": "2008-04-07 08:16:55",
- "created": "2007-03-05 13:09:27"
- }
- },
- {
- "pk": 5,
- "model": "files.platform",
- "fields": {
- "modified": "2008-04-07 08:16:56",
- "created": "2007-03-05 13:09:27"
- }
- },
{
"pk": 78829,
"model": "versions.version",
diff --git a/apps/addons/fixtures/addons/test_manager.json b/apps/addons/fixtures/addons/test_manager.json
index f05172c7884..81683c2db40 100644
--- a/apps/addons/fixtures/addons/test_manager.json
+++ b/apps/addons/fixtures/addons/test_manager.json
@@ -215,14 +215,6 @@
"addon": 1
}
},
- {
- "pk": 1,
- "model": "files.platform",
- "fields": {
- "modified": "2008-04-07 08:16:55",
- "created": "2007-03-05 13:09:27"
- }
- },
{
"pk": 11993,
"model": "files.file",
diff --git a/apps/addons/tests/test_buttons.py b/apps/addons/tests/test_buttons.py
index a9c823d6b9d..a5e186a407f 100644
--- a/apps/addons/tests/test_buttons.py
+++ b/apps/addons/tests/test_buttons.py
@@ -44,10 +44,10 @@ def setUp(self):
v.version = 'v1'
self.addon.current_version = v
- self.file = self.get_file(amo.PLATFORM_ALL)
+ self.file = self.get_file(amo.PLATFORM_ALL.id)
v.all_files = [self.file]
- self.platforms = amo.PLATFORM_MAC, amo.PLATFORM_LINUX
+ self.platforms = amo.PLATFORM_MAC.id, amo.PLATFORM_LINUX.id
self.platform_files = map(self.get_file, self.platforms)
self.request = Mock()
@@ -79,7 +79,7 @@ def render(self, **kwargs):
def get_file(self, platform):
file = Mock()
- file.platform_id = platform.id
+ file.platform = platform
file.latest_xpi_url.return_value = 'xpi.latest'
file.get_url_path.return_value = 'xpi.url'
file.eula_url.return_value = 'eula.url'
@@ -278,7 +278,7 @@ def test_after_no_show_contrib(self):
eq_(b.attrs(), {})
def test_file_details(self):
- file = self.get_file(amo.PLATFORM_ALL)
+ file = self.get_file(amo.PLATFORM_ALL.id)
self.addon.meet_the_dev_url.return_value = 'meet.dev'
b = self.get_button()
@@ -289,7 +289,7 @@ def test_file_details(self):
eq_(os, None)
# Platformer.
- file = self.get_file(amo.PLATFORM_MAC)
+ file = self.get_file(amo.PLATFORM_MAC.id)
_, _, os = b.file_details(file)
eq_(os, amo.PLATFORM_MAC)
@@ -306,7 +306,7 @@ def test_file_details(self):
'/en-US/firefox/addon/2/contribute/roadblock/?version=v1')
def test_file_details_unreviewed(self):
- file = self.get_file(amo.PLATFORM_ALL)
+ file = self.get_file(amo.PLATFORM_ALL.id)
file.status = amo.STATUS_UNREVIEWED
b = self.get_button()
@@ -333,7 +333,7 @@ def test_links(self):
links = self.get_button().links()
eq_(len(links), len(self.platforms))
- eq_([x.os for x in links], list(self.platforms))
+ eq_([x.os.id for x in links], list(self.platforms))
def test_link_with_invalid_file(self):
self.version.all_files = self.platform_files
@@ -342,7 +342,7 @@ def test_link_with_invalid_file(self):
expected_platforms = self.platforms[1:]
eq_(len(links), len(expected_platforms))
- eq_([x.os for x in links], list(expected_platforms))
+ eq_([x.os.id for x in links], list(expected_platforms))
def test_no_version(self):
self.addon.current_version = None
@@ -434,8 +434,9 @@ def test_multi_platform(self):
eq_(doc('.button').length, 2)
for platform in self.platforms:
- os = doc('.button.%s .os' % platform.shortname).attr('data-os')
- eq_(platform.name, os)
+ os = doc('.button.%s .os' %
+ amo.PLATFORMS[platform].shortname).attr('data-os')
+ eq_(amo.PLATFORMS[platform].name, os)
def test_compatible_apps(self):
compat = Mock()
@@ -538,7 +539,7 @@ def setUp(self):
def get_backup_file(self):
file = Mock()
- file.platform_id = amo.PLATFORM_ALL.id
+ file.platform = amo.PLATFORM_ALL.id
file.latest_xpi_url.return_value = 'xpi.backup'
file.get_url_path.return_value = 'xpi.backup.url'
file.status = amo.STATUS_PUBLIC
diff --git a/apps/addons/tests/test_cron.py b/apps/addons/tests/test_cron.py
index f7493e620f0..dd64f61c531 100644
--- a/apps/addons/tests/test_cron.py
+++ b/apps/addons/tests/test_cron.py
@@ -1,18 +1,15 @@
import os
import datetime
-from nose.exc import SkipTest
from nose.tools import eq_
import mock
-from django.conf import settings
-
import amo
import amo.tests
from addons import cron
from addons.models import Addon, AppSupport
from django.core.management.base import CommandError
-from files.models import File, Platform
+from files.models import File
from lib.es.utils import flag_reindexing_amo, unflag_reindexing_amo
from stats.models import UpdateCount
from versions.models import Version
@@ -119,7 +116,7 @@ class TestHideDisabledFiles(amo.tests.TestCase):
msg = 'Moving disabled file: %s => %s'
def setUp(self):
- p = Platform.objects.create(id=amo.PLATFORM_ALL.id)
+ p = amo.PLATFORM_ALL.id
self.addon = Addon.objects.create(type=amo.ADDON_EXTENSION)
self.version = Version.objects.create(addon=self.addon)
self.f1 = File.objects.create(version=self.version, platform=p,
diff --git a/apps/addons/tests/test_forms.py b/apps/addons/tests/test_forms.py
index 112f2baa6d8..cbd8f550a4c 100644
--- a/apps/addons/tests/test_forms.py
+++ b/apps/addons/tests/test_forms.py
@@ -86,7 +86,7 @@ def test_slug_isdigit(self):
class TestTagsForm(amo.tests.TestCase):
- fixtures = ['base/addon_3615', 'base/platforms', 'base/users']
+ fixtures = ['base/addon_3615', 'base/users']
def setUp(self):
self.addon = Addon.objects.get(pk=3615)
diff --git a/apps/addons/tests/test_models.py b/apps/addons/tests/test_models.py
index 30dcc203f58..77dfe3fdedd 100644
--- a/apps/addons/tests/test_models.py
+++ b/apps/addons/tests/test_models.py
@@ -31,7 +31,7 @@
from constants.applications import DEVICE_TYPES
from devhub.models import ActivityLog, AddonLog, RssKey, SubmitStep
from editors.models import EscalationQueue
-from files.models import File, Platform
+from files.models import File
from files.tests.test_models import UploadTest
from reviews.models import Review, ReviewFlag
from translations.models import Translation, TranslationSequence
@@ -300,7 +300,6 @@ class TestAddonModels(amo.tests.TestCase):
'base/appversion',
'base/collections',
'base/featured',
- 'base/platforms',
'base/users',
'base/addon_5299_gcal',
'base/addon_3615',
@@ -1504,7 +1503,6 @@ def test_review_delete(self):
class TestUpdateStatus(amo.tests.TestCase):
- fixtures = ['base/platforms', ]
def test_no_file_ends_with_NULL(self):
addon = Addon.objects.create(type=amo.ADDON_EXTENSION)
@@ -1624,8 +1622,7 @@ def test_featured_random(self):
class TestBackupVersion(amo.tests.TestCase):
- fixtures = ['addons/update', 'base/apps', 'base/appversion',
- 'base/platforms']
+ fixtures = ['addons/update', 'base/apps', 'base/appversion']
def setUp(self):
self.version_1_2_0 = 105387
@@ -1823,7 +1820,6 @@ def test_scores(self):
class TestAddonDependencies(amo.tests.TestCase):
fixtures = ['base/apps',
'base/appversion',
- 'base/platforms',
'base/users',
'base/addon_5299_gcal',
'base/addon_3615',
@@ -1863,7 +1859,6 @@ def test_listed_two_versions(self):
class TestFlushURLs(amo.tests.TestCase):
fixtures = ['base/apps',
'base/appversion',
- 'base/platforms',
'base/users',
'base/addon_5579',
'base/previews',
@@ -1915,7 +1910,7 @@ def setUp(self):
super(TestAddonFromUpload, self).setUp()
u = UserProfile.objects.get(pk=999)
set_user(u)
- self.platform = Platform.objects.create(id=amo.PLATFORM_MAC.id)
+ self.platform = amo.PLATFORM_MAC.id
for version in ('3.0', '3.6.*'):
AppVersion.objects.create(application_id=1, version=version)
self.addCleanup(translation.deactivate)
@@ -1948,17 +1943,16 @@ def test_xpi_version(self):
[self.platform])
v = addon.versions.get()
eq_(v.version, '0.1')
- eq_(v.files.get().platform_id, self.platform.id)
+ eq_(v.files.get().platform, self.platform)
eq_(v.files.get().status, amo.STATUS_UNREVIEWED)
def test_xpi_for_multiple_platforms(self):
- platforms = [Platform.objects.get(pk=amo.PLATFORM_LINUX.id),
- Platform.objects.get(pk=amo.PLATFORM_MAC.id)]
+ platforms = [amo.PLATFORM_LINUX.id, amo.PLATFORM_MAC.id]
addon = Addon.from_upload(self.get_upload('extension.xpi'),
platforms)
v = addon.versions.get()
- eq_(sorted([f.platform.id for f in v.all_files]),
- sorted([p.id for p in platforms]))
+ eq_(sorted([f.platform for f in v.all_files]),
+ sorted(platforms))
def test_search_attributes(self):
addon = Addon.from_upload(self.get_upload('search.xml'),
@@ -1977,7 +1971,7 @@ def test_search_version(self):
[self.platform])
v = addon.versions.get()
eq_(v.version, datetime.now().strftime('%Y%m%d'))
- eq_(v.files.get().platform_id, amo.PLATFORM_ALL.id)
+ eq_(v.files.get().platform, amo.PLATFORM_ALL.id)
eq_(v.files.get().status, amo.STATUS_UNREVIEWED)
def test_no_homepage(self):
@@ -2226,8 +2220,8 @@ def setUp(self):
super(TestLanguagePack, self).setUp()
self.addon = amo.tests.addon_factory(type=amo.ADDON_LPAPP,
status=amo.STATUS_PUBLIC)
- self.platform_all = Platform.objects.get(id=amo.PLATFORM_ALL.id)
- self.platform_mob = Platform.objects.create(id=amo.PLATFORM_ANDROID.id)
+ self.platform_all = amo.PLATFORM_ALL.id
+ self.platform_mob = amo.PLATFORM_ANDROID.id
self.version = self.addon.current_version
def test_extract(self):
diff --git a/apps/addons/tests/test_update.py b/apps/addons/tests/test_update.py
index 77620975e21..6e5243dd604 100644
--- a/apps/addons/tests/test_update.py
+++ b/apps/addons/tests/test_update.py
@@ -26,10 +26,7 @@ def get(self, data):
class TestDataValidate(VersionCheckMixin, amo.tests.TestCase):
- fixtures = ['base/addon_3615',
- 'base/platforms',
- 'base/apps',
- 'base/appversion']
+ fixtures = ['base/addon_3615', 'base/apps', 'base/appversion']
def setUp(self):
super(TestDataValidate, self).setUp()
@@ -97,10 +94,7 @@ def test_no_version(self):
class TestLookup(VersionCheckMixin, amo.tests.TestCase):
- fixtures = ['addons/update',
- 'base/apps',
- 'base/appversion',
- 'base/platforms']
+ fixtures = ['addons/update', 'base/apps', 'base/appversion']
def setUp(self):
super(TestLookup, self).setUp()
@@ -297,7 +291,7 @@ def test_platform_does_not_exist(self):
"""If client passes a platform, find that specific platform."""
version = Version.objects.get(pk=115509)
for file in version.files.all():
- file.platform_id = amo.PLATFORM_LINUX.id
+ file.platform = amo.PLATFORM_LINUX.id
file.save()
version, file = self.get('1.2', self.version_int,
@@ -308,7 +302,7 @@ def test_platform_exists(self):
"""If client passes a platform, find that specific platform."""
version = Version.objects.get(pk=115509)
for file in version.files.all():
- file.platform_id = amo.PLATFORM_LINUX.id
+ file.platform = amo.PLATFORM_LINUX.id
file.save()
version, file = self.get('1.2', self.version_int,
@@ -319,11 +313,11 @@ def test_file_for_platform(self):
"""If client passes a platform, make sure we get the right file."""
version = Version.objects.get(pk=self.version_1_2_2)
file_one = version.files.all()[0]
- file_one.platform_id = amo.PLATFORM_LINUX.id
+ file_one.platform = amo.PLATFORM_LINUX.id
file_one.save()
file_two = File(version=version, filename='foo', hash='bar',
- platform_id=amo.PLATFORM_WIN.id,
+ platform=amo.PLATFORM_WIN.id,
status=amo.STATUS_PUBLIC)
file_two.save()
version, file = self.get('1.2', self.version_int,
@@ -384,7 +378,7 @@ class TestDefaultToCompat(VersionCheckMixin, amo.tests.TestCase):
"""
Test default to compatible with all the various combinations of input.
"""
- fixtures = ['base/platforms', 'addons/default-to-compat']
+ fixtures = ['addons/default-to-compat']
def setUp(self):
super(TestDefaultToCompat, self).setUp()
@@ -570,9 +564,7 @@ def test_min_max_version(self):
class TestResponse(VersionCheckMixin, amo.tests.TestCase):
- fixtures = ['base/addon_3615',
- 'base/platforms',
- 'base/seamonkey']
+ fixtures = ['base/addon_3615', 'base/seamonkey']
def setUp(self):
super(TestResponse, self).setUp()
@@ -596,7 +588,7 @@ def test_bad_guid(self):
def test_no_platform(self):
file = File.objects.get(pk=67442)
- file.platform_id = self.win.id
+ file.platform = self.win.id
file.save()
data = self.good_data.copy()
@@ -611,12 +603,12 @@ def test_no_platform(self):
def test_different_platform(self):
file = File.objects.get(pk=67442)
- file.platform_id = self.win.id
+ file.platform = self.win.id
file.save()
file_pk = file.pk
file.id = None
- file.platform_id = self.mac.id
+ file.platform = self.mac.id
file.save()
mac_file_pk = file.pk
diff --git a/apps/amo/fixtures/base/addon_10423_youtubesearch.json b/apps/amo/fixtures/base/addon_10423_youtubesearch.json
index 7a384f3462e..e46d0c005b1 100644
--- a/apps/amo/fixtures/base/addon_10423_youtubesearch.json
+++ b/apps/amo/fixtures/base/addon_10423_youtubesearch.json
@@ -71,14 +71,6 @@
"localized_string_clean": null
}
},
- {
- "pk": 1,
- "model": "files.platform",
- "fields": {
- "modified": "2008-04-07 08:16:55",
- "created": "2007-03-05 13:09:27"
- }
- },
{
"pk": 10423,
"model": "addons.addon",
diff --git a/apps/amo/fixtures/base/addon_3615.json b/apps/amo/fixtures/base/addon_3615.json
index 87e65e24ad2..a72878554a3 100644
--- a/apps/amo/fixtures/base/addon_3615.json
+++ b/apps/amo/fixtures/base/addon_3615.json
@@ -148,22 +148,6 @@
"id": 650353
}
},
- {
- "pk": 1,
- "model": "files.platform",
- "fields": {
- "modified": "2008-04-07 08:16:55",
- "created": "2007-03-05 13:09:27"
- }
- },
- {
- "pk": 2,
- "model": "files.platform",
- "fields": {
- "modified": "2008-04-07 08:16:55",
- "created": "2007-03-05 13:09:27"
- }
- },
{
"pk": 3615,
"model": "addons.addon",
diff --git a/apps/amo/fixtures/base/addon_4594_a9.json b/apps/amo/fixtures/base/addon_4594_a9.json
index 164d4c69140..3e1cb2e73be 100644
--- a/apps/amo/fixtures/base/addon_4594_a9.json
+++ b/apps/amo/fixtures/base/addon_4594_a9.json
@@ -23,14 +23,6 @@
"localized_string_clean": null
}
},
- {
- "pk": 1,
- "model": "files.platform",
- "fields": {
- "modified": "2008-04-07 08:16:55",
- "created": "2007-03-05 13:09:27"
- }
- },
{
"pk": 4594,
"model": "addons.addon",
diff --git a/apps/amo/fixtures/base/addon_4664_twitterbar.json b/apps/amo/fixtures/base/addon_4664_twitterbar.json
index 6714e1059d5..2e6f352c44b 100644
--- a/apps/amo/fixtures/base/addon_4664_twitterbar.json
+++ b/apps/amo/fixtures/base/addon_4664_twitterbar.json
@@ -82,14 +82,6 @@
"localized_string_clean": "* Now with better and more relevant trending news in the Twitter sidebar."
}
},
- {
- "pk": 1,
- "model": "files.platform",
- "fields": {
- "modified": "2008-04-07 08:16:55",
- "created": "2007-03-05 13:09:27"
- }
- },
{
"pk": 4664,
"model": "addons.addon",
diff --git a/apps/amo/fixtures/base/addon_5299_gcal.json b/apps/amo/fixtures/base/addon_5299_gcal.json
index bc180cac182..3e4a5d452b0 100644
--- a/apps/amo/fixtures/base/addon_5299_gcal.json
+++ b/apps/amo/fixtures/base/addon_5299_gcal.json
@@ -22,14 +22,6 @@
"id": 58814
}
},
- {
- "pk": 1,
- "model": "files.platform",
- "fields": {
- "modified": "2008-04-07 08:16:55",
- "created": "2007-03-05 13:09:27"
- }
- },
{
"pk": 5299,
"model": "addons.addon",
diff --git a/apps/amo/fixtures/base/addon_59.json b/apps/amo/fixtures/base/addon_59.json
index 06a4ff8748b..a0642324742 100644
--- a/apps/amo/fixtures/base/addon_59.json
+++ b/apps/amo/fixtures/base/addon_59.json
@@ -76,14 +76,6 @@
"addon": 59
}
},
- {
- "pk": 1,
- "model": "files.platform",
- "fields": {
- "modified": "2008-04-07 08:16:55",
- "created": "2007-03-05 13:09:27"
- }
- },
{
"pk": 56975,
"model": "files.file",
diff --git a/apps/amo/fixtures/base/addon_592.json b/apps/amo/fixtures/base/addon_592.json
index 61c32574b4b..11e72c3925f 100644
--- a/apps/amo/fixtures/base/addon_592.json
+++ b/apps/amo/fixtures/base/addon_592.json
@@ -21,14 +21,6 @@
"id": 3400
}
},
- {
- "pk": 1,
- "model": "files.platform",
- "fields": {
- "modified": "2008-04-07 08:16:55",
- "created": "2007-03-05 13:09:27"
- }
- },
{
"pk": 592,
"model": "addons.addon",
diff --git a/apps/amo/fixtures/base/addontag.json b/apps/amo/fixtures/base/addontag.json
index 679801a005e..83183098cec 100644
--- a/apps/amo/fixtures/base/addontag.json
+++ b/apps/amo/fixtures/base/addontag.json
@@ -138,14 +138,6 @@
"addon": 8680
}
},
- {
- "pk": 1,
- "model": "files.platform",
- "fields": {
- "modified": "2008-04-07 08:16:55",
- "created": "2007-03-05 13:09:27"
- }
- },
{
"pk": 71943,
"model": "files.file",
diff --git a/apps/amo/fixtures/base/apps.json b/apps/amo/fixtures/base/apps.json
index 35ee6b08b39..7a13086d395 100644
--- a/apps/amo/fixtures/base/apps.json
+++ b/apps/amo/fixtures/base/apps.json
@@ -52,21 +52,5 @@
"modified": "2006-08-21 23:53:19",
"created": "2006-08-21 23:53:19"
}
- },
- {
- "pk": 1,
- "model": "files.platform",
- "fields": {
- "modified": "2008-04-07 08:16:55",
- "created": "2007-03-05 13:09:27"
- }
- },
- {
- "pk": 2,
- "model": "files.platform",
- "fields": {
- "modified": "2008-04-07 08:16:55",
- "created": "2007-03-05 13:09:27"
- }
}
]
diff --git a/apps/amo/fixtures/base/featured.json b/apps/amo/fixtures/base/featured.json
index bdd8e8bdabd..7ee56285fa3 100644
--- a/apps/amo/fixtures/base/featured.json
+++ b/apps/amo/fixtures/base/featured.json
@@ -477,14 +477,6 @@
"the_reason": null
}
},
- {
- "pk": 1,
- "model": "files.platform",
- "fields": {
- "modified": "2008-04-07 08:16:55",
- "created": "2007-03-05 13:09:27"
- }
- },
{
"pk": 15679,
"model": "versions.version",
diff --git a/apps/amo/fixtures/base/platforms.json b/apps/amo/fixtures/base/platforms.json
deleted file mode 100644
index cb866dda404..00000000000
--- a/apps/amo/fixtures/base/platforms.json
+++ /dev/null
@@ -1,74 +0,0 @@
-[
- {
- "pk": 1,
- "model": "files.platform",
- "fields": {
- "modified": "2008-04-07 08:16:55",
- "created": "2007-03-05 13:09:27"
- }
- },
- {
- "pk": 2,
- "model": "files.platform",
- "fields": {
- "modified": "2008-04-07 08:16:55",
- "created": "2007-03-05 13:09:27"
- }
- },
- {
- "pk": 3,
- "model": "files.platform",
- "fields": {
- "modified": "2008-04-07 08:16:55",
- "created": "2007-03-05 13:09:27"
- }
- },
- {
- "pk": 4,
- "model": "files.platform",
- "fields": {
- "modified": "2008-04-07 08:16:55",
- "created": "2007-03-05 13:09:27"
- }
- },
- {
- "pk": 5,
- "model": "files.platform",
- "fields": {
- "modified": "2008-04-07 08:16:56",
- "created": "2007-03-05 13:09:27"
- }
- },
- {
- "pk": 6,
- "model": "files.platform",
- "fields": {
- "modified": "2008-04-07 08:16:56",
- "created": "2007-03-05 13:09:27"
- }
- },
- {
- "pk": 7,
- "model": "files.platform",
- "fields": {
- "modified": "2008-04-07 08:16:56",
- "created": "2007-03-05 13:09:27"
- }
- },
- {
- "pk": 8,
- "model": "files.platform",
- "fields": {
- "modified": "2008-04-07 08:16:56",
- "created": "2007-03-05 13:09:27"
- }
- },
- {
- "pk": 9,
- "model": "files.platform",
- "fields": {
- "modified": "2008-04-07 08:16:56",
- "created": "2007-03-05 13:09:27"
- }
- }
-]
diff --git a/apps/amo/fixtures/base/seamonkey.json b/apps/amo/fixtures/base/seamonkey.json
index 8af0a25cb6d..63f57513d7b 100644
--- a/apps/amo/fixtures/base/seamonkey.json
+++ b/apps/amo/fixtures/base/seamonkey.json
@@ -89,14 +89,6 @@
"addon": 6076
}
},
- {
- "pk": 1,
- "model": "files.platform",
- "fields": {
- "modified": "2008-04-07 08:16:55",
- "created": "2007-03-05 13:09:27"
- }
- },
{
"pk": 49431,
"model": "versions.version",
diff --git a/apps/amo/tests/__init__.py b/apps/amo/tests/__init__.py
index d45a0c26cfa..ab0cfdabf07 100644
--- a/apps/amo/tests/__init__.py
+++ b/apps/amo/tests/__init__.py
@@ -46,7 +46,7 @@
from amo.urlresolvers import get_url_prefix, Prefixer, reverse, set_url_prefix
from applications.models import Application, AppVersion
from bandwagon.models import Collection
-from files.models import File, Platform
+from files.models import File
from lib.es.signals import process, reset
from translations.hold import clean_translations
from translations.models import Translation
@@ -655,10 +655,9 @@ def collection_factory(**kw):
def file_factory(**kw):
v = kw['version']
- p, _ = Platform.objects.get_or_create(id=amo.PLATFORM_ALL.id)
status = kw.pop('status', amo.STATUS_PUBLIC)
f = File.objects.create(filename='%s-%s' % (v.addon_id, v.id),
- platform=p, status=status, **kw)
+ platform=amo.PLATFORM_ALL.id, status=status, **kw)
return f
diff --git a/apps/api/templates/api/includes/addon.xml b/apps/api/templates/api/includes/addon.xml
index 7e425a24c22..5b3b50222b7 100644
--- a/apps/api/templates/api/includes/addon.xml
+++ b/apps/api/templates/api/includes/addon.xml
@@ -90,7 +90,7 @@
{%- if version -%}
{%- for file in version.all_files -%}