Skip to content

Commit cc39b29

Browse files
author
Matthias
committed
writing tests
1 parent d592541 commit cc39b29

File tree

2 files changed

+18
-4
lines changed

2 files changed

+18
-4
lines changed

tests/test_export.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
1+
import pickle
12
from mapswipe_workers.basic import BaseFunctions
23

34

45
def test_transfer_results():
5-
BaseFunctions.run_export('production', [])
6+
7+
filename = 'firebase_imported_projects.pickle'
8+
with open(filename, 'rb') as f:
9+
imported_projects = pickle.load(f)
10+
11+
project_ids = [i[1] for i in imported_projects]
12+
BaseFunctions.run_export('production', project_ids)
613

714

815
if __name__ == '__main__':

tests/test_update.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
1+
import pickle
12
from mapswipe_workers.basic import BaseFunctions
23

34

4-
def test_transfer_results():
5-
BaseFunctions.run_update('production', [])
5+
def test_update():
6+
7+
filename = 'firebase_imported_projects.pickle'
8+
with open(filename, 'rb') as f:
9+
imported_projects = pickle.load(f)
10+
11+
project_ids = [i[1] for i in imported_projects]
12+
BaseFunctions.run_update('production', project_ids)
613

714

815
if __name__ == '__main__':
9-
test_transfer_results()
16+
test_update()

0 commit comments

Comments
 (0)