File diff 43a2e1bec828 → 96a363633f5e
tests/test_books_loader.py
Show inline comments
...
 
@@ -11,12 +11,14 @@
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
# GNU Affero General Public License for more details.
 
#
 
# You should have received a copy of the GNU Affero General Public License
 
# along with this program.  If not, see <https://www.gnu.org/licenses/>.
 

	
 
import hashlib
 

	
 
from datetime import date
 
from pathlib import Path
 

	
 
import pytest
 

	
 
from . import testutil
...
 
@@ -71,6 +73,11 @@ def test_fy_range_string_one_offset(conservancy_loader, year_offset):
 
def test_fy_range_string_plugins_override(conservancy_loader, plugins):
 
    expected = expect_string([2019, 2020], plugins)
 
    assert conservancy_loader.fy_range_string(2019, 2020, plugins) == expected
 

	
 
def test_fy_range_string_empty_range(conservancy_loader):
 
    assert conservancy_loader.fy_range_string(2020, 2019) == ''
 

	
 
def test_load_fy_range_empty(conservancy_loader):
 
    entries, errors, options_map = conservancy_loader.load_fy_range(2020, 2019)
 
    assert not entries
 
    assert options_map.get('input_hash') == hashlib.md5().hexdigest()