Total Complexity | 1 |
Total Lines | 37 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | #!/usr/bin/env python3 |
||
2 | # -*- coding: utf-8 -*- |
||
3 | """ |
||
4 | Created on Tue Jul 2 10:57:13 2019 |
||
5 | |||
6 | @author: Paolo Cozzi <[email protected]> |
||
7 | """ |
||
8 | |||
9 | from common.tests import DataSourceMixinTestCase |
||
10 | from image_app.models import Submission |
||
11 | |||
12 | |||
13 | class BaseExcelMixin(DataSourceMixinTestCase): |
||
14 | # define attribute in DataSourceMixinTestCase |
||
15 | model = Submission |
||
16 | |||
17 | # import this file and populate database once |
||
18 | fixtures = [ |
||
19 | 'excel/dictspecie', |
||
20 | 'excel/speciesynonym', |
||
21 | 'excel/submission', |
||
22 | 'image_app/dictcountry', |
||
23 | 'image_app/dictrole', |
||
24 | 'image_app/dictsex', |
||
25 | 'image_app/organization', |
||
26 | 'image_app/user', |
||
27 | |||
28 | ] |
||
29 | |||
30 | def setUp(self): |
||
31 | # calling my base class setup |
||
32 | super().setUp() |
||
33 | |||
34 | # track submission |
||
35 | self.submission = Submission.objects.get(pk=1) |
||
36 | self.submission_id = 1 |
||
37 |