Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_interval():
assert Interval.get("month") is Interval.MONTH
assert Interval.get("year") is Interval.YEAR
assert Interval.get("YEAR") is Interval.YEAR
assert Interval.get("asdfasdf") is Interval.MONTH
def test_interval():
assert Interval.get("month") is Interval.MONTH
assert Interval.get("year") is Interval.YEAR
assert Interval.get("YEAR") is Interval.YEAR
assert Interval.get("asdfasdf") is Interval.MONTH
def test_interval():
assert Interval.get("month") is Interval.MONTH
assert Interval.get("year") is Interval.YEAR
assert Interval.get("YEAR") is Interval.YEAR
assert Interval.get("asdfasdf") is Interval.MONTH
def test_interval():
assert Interval.get("month") is Interval.MONTH
assert Interval.get("year") is Interval.YEAR
assert Interval.get("YEAR") is Interval.YEAR
assert Interval.get("asdfasdf") is Interval.MONTH
def _pull_beancount_file(_, values):
g.beancount_file_slug = values.pop("bfile", None) if values else None
with LOAD_FILE_LOCK:
if not app.config.get("LEDGERS"):
_load_file()
if not g.beancount_file_slug:
g.beancount_file_slug = app.config["FILE_SLUGS"][0]
if g.beancount_file_slug not in app.config["FILE_SLUGS"]:
abort(404)
g.ledger = app.config["LEDGERS"][g.beancount_file_slug]
g.conversion = request.args.get("conversion")
g.partial = request.args.get("partial", False)
g.interval = Interval.get(
request.args.get("interval", g.ledger.fava_options["interval"])
)