def test_open(json_mock):
    reader = JsonInputReader()
    json_mock.load.return_value = 'sample output'
    assert reader._JsonInputReader__data == None
    reader.open(123)
    json_mock.load.assert_called_with(123)
    assert reader._JsonInputReader__data == 'sample output'
def test_iter(test_iter_args):
    reader = JsonInputReader()
    reader._JsonInputReader__data = dict(transactions=[test_iter_args[0]])
    iterator = iter(reader)
    n = iterator.next()
    assert type(n) == type(test_iter_args[1])
    assert vars(n) == vars(test_iter_args[1])