Skip to content

Instantly share code, notes, and snippets.

@tisto
Created August 20, 2015 08:16
Show Gist options
  • Save tisto/abf3462be3715eeadb53 to your computer and use it in GitHub Desktop.
Save tisto/abf3462be3715eeadb53 to your computer and use it in GitHub Desktop.
def test_FilenameToRefId():
tm = Transmogrifier(object())
tm._raw = []
tm._data = {}
previous = iter([{'filename': '1_iskandarsyah2014.pdf'}])
transform = FilenameToRefId(tm, 'test', {}, previous)
result = transform.__iter__().next()
assert 'ref_id' in result
assert 'iskandarsyah2014' == result.get('ref_id')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment