@@ 248-263 (lines=16) @@ | ||
245 | ||
246 | @is_private() |
|
247 | @temporary_media_root(MEDIA_URL='http://cache.pack.google.com/edgedl/chrome/install/782.112/') |
|
248 | def test_detail(self): |
|
249 | super(VersionTest, self).test_detail() |
|
250 | ||
251 | @is_private() |
|
252 | @temporary_media_root(MEDIA_URL='http://cache.pack.google.com/edgedl/chrome/install/782.112/') |
|
253 | def test_list(self): |
|
254 | super(VersionTest, self).test_list() |
|
255 | ||
256 | @is_private() |
|
257 | @temporary_media_root(MEDIA_URL='http://cache.pack.google.com/edgedl/chrome/install/782.112/') |
|
258 | def test_create(self): |
|
259 | data = dict( |
|
260 | app=ApplicationFactory.create().id, |
|
261 | platform=PlatformFactory.create().id, |
|
262 | channel=ChannelFactory.create().id, |
|
263 | version='1.2.3.4', |
|
264 | file=SimpleUploadedFile("chrome.exe", b'content'), |
|
265 | ) |
|
266 | response = self.client.post(reverse(self.url), data) |
@@ 54-68 (lines=15) @@ | ||
51 | @temporary_media_root(MEDIA_URL='http://cache.pack.google.com/edgedl/chrome/install/782.112/') |
|
52 | def test_detail(self): |
|
53 | super(VersionTest, self).test_detail() |
|
54 | ||
55 | @is_private() |
|
56 | @temporary_media_root(MEDIA_URL='http://cache.pack.google.com/edgedl/chrome/install/782.112/') |
|
57 | def test_list(self): |
|
58 | super(VersionTest, self).test_list() |
|
59 | ||
60 | @is_private() |
|
61 | @temporary_media_root(MEDIA_URL='http://cache.pack.google.com/edgedl/chrome/install/782.112/') |
|
62 | def test_create(self): |
|
63 | data = dict( |
|
64 | app=ApplicationFactory.create().id, |
|
65 | channel=ChannelFactory.create().id, |
|
66 | version='3.4', |
|
67 | file=SimpleUploadedFile("chrome.exe", b'content'), |
|
68 | ) |
|
69 | response = self.client.post(reverse(self.url), data) |
|
70 | self.assertEqual(response.status_code, status.HTTP_201_CREATED) |
|
71 | version = SparkleVersion.objects.get(id=response.data['id']) |