replace len(mock_calls) with assert_called_once(). can't use this elsewhere because of side effect, sadly