|
@@ 189-212 (lines=24) @@
|
| 186 |
|
) |
| 187 |
|
|
| 188 |
|
|
| 189 |
|
class SuccessfulDeleteSamplesViewTest( |
| 190 |
|
BatchDeleteMixin, TestCase): |
| 191 |
|
|
| 192 |
|
def setUp(self): |
| 193 |
|
"""call base method""" |
| 194 |
|
|
| 195 |
|
# call base method |
| 196 |
|
super().setUp() |
| 197 |
|
|
| 198 |
|
# defining patcher |
| 199 |
|
self.batch_delete_patcher = patch( |
| 200 |
|
'samples.tasks.BatchDeleteSamples.delay') |
| 201 |
|
self.batch_delete = self.batch_delete_patcher.start() |
| 202 |
|
|
| 203 |
|
# explict url (is not a submission:delete view) |
| 204 |
|
self.url = reverse('submissions:delete_samples', kwargs={'pk': 1}) |
| 205 |
|
|
| 206 |
|
self.data = {'to_delete': 'Siems_0722_393449'} |
| 207 |
|
|
| 208 |
|
# get a response |
| 209 |
|
self.response = self.client.post( |
| 210 |
|
self.url, |
| 211 |
|
self.data, |
| 212 |
|
follow=True |
| 213 |
|
) |
| 214 |
|
|
|
@@ 162-185 (lines=24) @@
|
| 159 |
|
"waiting for batch delete to complete") |
| 160 |
|
|
| 161 |
|
|
| 162 |
|
class SuccessfulDeleteAnimalsViewTest( |
| 163 |
|
BatchDeleteMixin, TestCase): |
| 164 |
|
|
| 165 |
|
def setUp(self): |
| 166 |
|
"""call base method""" |
| 167 |
|
|
| 168 |
|
# call base method |
| 169 |
|
super().setUp() |
| 170 |
|
|
| 171 |
|
# defining patcher |
| 172 |
|
self.batch_delete_patcher = patch( |
| 173 |
|
'animals.tasks.BatchDeleteAnimals.delay') |
| 174 |
|
self.batch_delete = self.batch_delete_patcher.start() |
| 175 |
|
|
| 176 |
|
# explict url (is not a submission:delete view) |
| 177 |
|
self.url = reverse('submissions:delete_animals', kwargs={'pk': 1}) |
| 178 |
|
|
| 179 |
|
self.data = {'to_delete': 'ANIMAL:::ID:::132713'} |
| 180 |
|
|
| 181 |
|
# get a response |
| 182 |
|
self.response = self.client.post( |
| 183 |
|
self.url, |
| 184 |
|
self.data, |
| 185 |
|
follow=True |
| 186 |
|
) |
| 187 |
|
|
| 188 |
|
|