-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_omnia.py
More file actions
39 lines (33 loc) · 1.47 KB
/
test_omnia.py
File metadata and controls
39 lines (33 loc) · 1.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import omnia_atari
def test_find_atari_files():
test_files = [
'DigDug.atr',
'BogusRandomThing.png',
'Mugwump.txt',
'Moof.room',
'Moof.rom',
'ObviouslyNotAtari.exe',
'this.xexis.moo'
]
assert omnia_atari.find_atari_files(test_files) == [
'DigDug.atr',
'Moof.rom',
]
# THIS IS ENTIRELY WRONG. I guess I need to mock out all the internetarchive API objects? -CAP
#
# def test_get_item_files():
# fake_item_files = [{'name': 'BP4kgXMeRjGVbPTkRfQ3g_thumb_a8b_archive.torrent',
# 'source': 'metadata',
# 'btih': '8ae6ff804ba1dbd76321fa92ced0533e972963a4',
# 'mtime': '1613248077',
# 'size': '2170',
# 'md5': 'd35fca8e48203e68313468d918340a85',
# 'crc32': 'bea74742',
# 'sha1': 'a03e07fb1caed3ce34ee87c6d961207cdaf4db36',
# 'format': 'Archive BitTorrent'},
# {'name': 'BP4kgXMeRjGVbPTkRfQ3g_thumb_a8b_files.xml',
# 'source': 'original',
# 'format': 'Metadata',
# 'md5': '6ba5d3e8bf5a324c51f5202e664876bd'}]
# assert omnia_atari.get_item_files(fake_item_files) == ['BP4kgXMeRjGVbPTkRfQ3g_thumb_a8b_archive.torrent',
# 'BP4kgXMeRjGVbPTkRfQ3g_thumb_a8b_files.xml']