|
@@ 79-89 (lines=11) @@
|
| 76 |
|
self.assertEqual(symbols.debug_file, 'BreakpadTestApp.pdb') |
| 77 |
|
|
| 78 |
|
@is_private() |
| 79 |
|
@temporary_media_root(MEDIA_URL='http://cache.pack.google.com/edgedl/chrome/install/782.112/') |
| 80 |
|
def test_create_without_file(self): |
| 81 |
|
data = dict() |
| 82 |
|
response = self.client.post(reverse(self.url), data) |
| 83 |
|
self.assertEqual(response.status_code, status.HTTP_400_BAD_REQUEST) |
| 84 |
|
self.assertEqual(response.data, {'file': [u'No file was submitted.']}) |
| 85 |
|
|
| 86 |
|
@is_private() |
| 87 |
|
def test_duplicate(self): |
| 88 |
|
with open(SYM_FILE, 'rb') as f: |
| 89 |
|
data = dict(file=SimpleUploadedFile('./BreakpadTestApp.sym', f.read())) |
| 90 |
|
response = self.client.post(reverse(self.url), data) |
| 91 |
|
self.assertEqual(response.status_code, status.HTTP_201_CREATED) |
| 92 |
|
with open(SYM_FILE, 'rb') as f: |
|
@@ 59-69 (lines=11) @@
|
| 56 |
|
@is_private() |
| 57 |
|
@temporary_media_root(MEDIA_URL='http://cache.pack.google.com/edgedl/chrome/install/782.112/') |
| 58 |
|
def test_detail(self): |
| 59 |
|
super(SymbolsTest, self).test_detail() |
| 60 |
|
|
| 61 |
|
@is_private() |
| 62 |
|
@temporary_media_root(MEDIA_URL='http://cache.pack.google.com/edgedl/chrome/install/782.112/') |
| 63 |
|
def test_list(self): |
| 64 |
|
super(SymbolsTest, self).test_list() |
| 65 |
|
|
| 66 |
|
@is_private() |
| 67 |
|
@temporary_media_root(MEDIA_URL='http://cache.pack.google.com/edgedl/chrome/install/782.112/') |
| 68 |
|
def test_create(self): |
| 69 |
|
with open(SYM_FILE, 'rb') as f: |
| 70 |
|
data = dict(file=SimpleUploadedFile('./BreakpadTestApp.sym', f.read())) |
| 71 |
|
response = self.client.post(reverse(self.url), data) |
| 72 |
|
self.assertEqual(response.status_code, status.HTTP_201_CREATED) |