statement_reconciler: Add test for CONSERVANCY_REPOSITORY not set
This commit is contained in:
parent
93d73788c5
commit
e2f90d86bb
1 changed files with 9 additions and 0 deletions
|
@ -1,3 +1,4 @@
|
||||||
|
import argparse
|
||||||
import datetime
|
import datetime
|
||||||
import decimal
|
import decimal
|
||||||
import io
|
import io
|
||||||
|
@ -12,6 +13,7 @@ from conservancy_beancount.reconcile.statement_reconciler import (
|
||||||
format_output,
|
format_output,
|
||||||
match_statement_and_books,
|
match_statement_and_books,
|
||||||
metadata_for_match,
|
metadata_for_match,
|
||||||
|
parse_repo_relative_path,
|
||||||
payee_match,
|
payee_match,
|
||||||
read_amex_csv,
|
read_amex_csv,
|
||||||
read_fr_csv,
|
read_fr_csv,
|
||||||
|
@ -152,6 +154,13 @@ B4C = {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
def test_warns_missing_env(monkeypatch):
|
||||||
|
monkeypatch.delenv('CONSERVANCY_REPOSITORY', raising=False)
|
||||||
|
with pytest.raises(argparse.ArgumentTypeError) as excinfo:
|
||||||
|
parse_repo_relative_path('/') # path / always exists
|
||||||
|
assert "CONSERVANCY_REPOSITORY" in str(excinfo.value)
|
||||||
|
|
||||||
|
|
||||||
def test_one_exact_match():
|
def test_one_exact_match():
|
||||||
statement = [S1]
|
statement = [S1]
|
||||||
books = [B1]
|
books = [B1]
|
||||||
|
|
Loading…
Add table
Reference in a new issue