Skip to content

Commit

Permalink
actually expose magic compat module, version 0.3.4
Browse files Browse the repository at this point in the history
  • Loading branch information
jbremer committed Jun 2, 2018
1 parent d52d719 commit d1b9219
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

setup(
name="SFlock",
version="0.3.3",
version="0.3.4",
author="Jurriaan Bremer",
author_email="jbr@cuckoo.sh",
packages=[
Expand Down
3 changes: 2 additions & 1 deletion sflock/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Copyright (C) 2015-2017 Jurriaan Bremer.
# Copyright (C) 2015-2018 Jurriaan Bremer.
# This file is part of SFlock - http://www.sflock.org/.
# See the file 'docs/LICENSE.txt' for copying permission.

from sflock.compat import magic
from sflock.exception import UnpackException
from sflock.main import ident, unpack, supported, zipify
16 changes: 16 additions & 0 deletions tests/test_magic.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Copyright (C) 2018 Jurriaan Bremer.
# This file is part of SFlock - http://www.sflock.org/.
# See the file 'docs/LICENSE.txt' for copying permission.

from sflock import magic

def test_magic():
assert magic.from_file("tests/files/maldoc.xls").startswith((
"Composite Document File V2", "CDF V2 Document"
))
assert magic.from_file("tests/files/test.hta_").startswith(
"HTML document"
)
assert magic.from_file("tests/files/cab2.cab").startswith(
"Microsoft Cabinet"
)

0 comments on commit d1b9219

Please sign in to comment.