@@ 248-263 (lines=16) @@ | ||
245 | @is_private() |
|
246 | @temporary_media_root(MEDIA_URL='http://cache.pack.google.com/edgedl/chrome/install/782.112/') |
|
247 | def test_detail(self): |
|
248 | super(VersionTest, self).test_detail() |
|
249 | ||
250 | @is_private() |
|
251 | @temporary_media_root(MEDIA_URL='http://cache.pack.google.com/edgedl/chrome/install/782.112/') |
|
252 | def test_list(self): |
|
253 | super(VersionTest, self).test_list() |
|
254 | ||
255 | @is_private() |
|
256 | @temporary_media_root(MEDIA_URL='http://cache.pack.google.com/edgedl/chrome/install/782.112/') |
|
257 | def test_create(self): |
|
258 | data = dict( |
|
259 | app=ApplicationFactory.create().id, |
|
260 | platform=PlatformFactory.create().id, |
|
261 | channel=ChannelFactory.create().id, |
|
262 | version='1.2.3.4', |
|
263 | file=SimpleUploadedFile("chrome.exe", b'content'), |
|
264 | ) |
|
265 | response = self.client.post(reverse(self.url), data) |
|
266 | self.assertEqual(response.status_code, status.HTTP_201_CREATED) |
@@ 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']) |