Removed the period filter from the unapplied original line items and unmatched offsets. It does not make sense for these two reports.
This commit is contained in:
@ -108,11 +108,11 @@ class ReportTestCase(unittest.TestCase):
|
||||
self.assertEqual(response.status_code, 403)
|
||||
|
||||
response = client.get(
|
||||
f"{PREFIX}/unapplied/USD/{Accounts.PAYABLE}/all-time")
|
||||
f"{PREFIX}/unapplied/USD/{Accounts.PAYABLE}")
|
||||
self.assertEqual(response.status_code, 403)
|
||||
|
||||
response = client.get(
|
||||
f"{PREFIX}/unapplied/USD/{Accounts.PAYABLE}/all-time?as=csv")
|
||||
f"{PREFIX}/unapplied/USD/{Accounts.PAYABLE}?as=csv")
|
||||
self.assertEqual(response.status_code, 403)
|
||||
|
||||
response = client.get(f"{PREFIX}/unmatched")
|
||||
@ -122,11 +122,11 @@ class ReportTestCase(unittest.TestCase):
|
||||
self.assertEqual(response.status_code, 403)
|
||||
|
||||
response = client.get(
|
||||
f"{PREFIX}/unmatched/USD/{Accounts.PAYABLE}/all-time")
|
||||
f"{PREFIX}/unmatched/USD/{Accounts.PAYABLE}")
|
||||
self.assertEqual(response.status_code, 403)
|
||||
|
||||
response = client.get(
|
||||
f"{PREFIX}/unmatched/USD/{Accounts.PAYABLE}/all-time?as=csv")
|
||||
f"{PREFIX}/unmatched/USD/{Accounts.PAYABLE}?as=csv")
|
||||
self.assertEqual(response.status_code, 403)
|
||||
|
||||
response = client.get(f"{PREFIX}/search?q=Salary")
|
||||
@ -207,11 +207,11 @@ class ReportTestCase(unittest.TestCase):
|
||||
self.assertEqual(response.headers["Content-Type"], CSV_MIME)
|
||||
|
||||
response = client.get(
|
||||
f"{PREFIX}/unapplied/USD/{Accounts.PAYABLE}/all-time")
|
||||
f"{PREFIX}/unapplied/USD/{Accounts.PAYABLE}")
|
||||
self.assertEqual(response.status_code, 200)
|
||||
|
||||
response = client.get(
|
||||
f"{PREFIX}/unapplied/USD/{Accounts.PAYABLE}/all-time?as=csv")
|
||||
f"{PREFIX}/unapplied/USD/{Accounts.PAYABLE}?as=csv")
|
||||
self.assertEqual(response.status_code, 200)
|
||||
self.assertEqual(response.headers["Content-Type"], CSV_MIME)
|
||||
|
||||
@ -222,11 +222,11 @@ class ReportTestCase(unittest.TestCase):
|
||||
self.assertEqual(response.status_code, 403)
|
||||
|
||||
response = client.get(
|
||||
f"{PREFIX}/unmatched/USD/{Accounts.PAYABLE}/all-time")
|
||||
f"{PREFIX}/unmatched/USD/{Accounts.PAYABLE}")
|
||||
self.assertEqual(response.status_code, 403)
|
||||
|
||||
response = client.get(
|
||||
f"{PREFIX}/unmatched/USD/{Accounts.PAYABLE}/all-time?as=csv")
|
||||
f"{PREFIX}/unmatched/USD/{Accounts.PAYABLE}?as=csv")
|
||||
self.assertEqual(response.status_code, 403)
|
||||
|
||||
response = client.get(f"{PREFIX}/search?q=Salary")
|
||||
@ -308,11 +308,11 @@ class ReportTestCase(unittest.TestCase):
|
||||
self.assertEqual(response.headers["Content-Type"], CSV_MIME)
|
||||
|
||||
response = self.client.get(
|
||||
f"{PREFIX}/unapplied/USD/{Accounts.PAYABLE}/all-time")
|
||||
f"{PREFIX}/unapplied/USD/{Accounts.PAYABLE}")
|
||||
self.assertEqual(response.status_code, 200)
|
||||
|
||||
response = self.client.get(
|
||||
f"{PREFIX}/unapplied/USD/{Accounts.PAYABLE}/all-time?as=csv")
|
||||
f"{PREFIX}/unapplied/USD/{Accounts.PAYABLE}?as=csv")
|
||||
self.assertEqual(response.status_code, 200)
|
||||
self.assertEqual(response.headers["Content-Type"], CSV_MIME)
|
||||
|
||||
@ -324,11 +324,11 @@ class ReportTestCase(unittest.TestCase):
|
||||
self.assertEqual(response.headers["Content-Type"], CSV_MIME)
|
||||
|
||||
response = self.client.get(
|
||||
f"{PREFIX}/unmatched/USD/{Accounts.PAYABLE}/all-time")
|
||||
f"{PREFIX}/unmatched/USD/{Accounts.PAYABLE}")
|
||||
self.assertEqual(response.status_code, 200)
|
||||
|
||||
response = self.client.get(
|
||||
f"{PREFIX}/unmatched/USD/{Accounts.PAYABLE}/all-time?as=csv")
|
||||
f"{PREFIX}/unmatched/USD/{Accounts.PAYABLE}?as=csv")
|
||||
self.assertEqual(response.status_code, 200)
|
||||
self.assertEqual(response.headers["Content-Type"], CSV_MIME)
|
||||
|
||||
@ -410,11 +410,11 @@ class ReportTestCase(unittest.TestCase):
|
||||
self.assertEqual(response.headers["Content-Type"], CSV_MIME)
|
||||
|
||||
response = self.client.get(
|
||||
f"{PREFIX}/unapplied/USD/{Accounts.PAYABLE}/all-time")
|
||||
f"{PREFIX}/unapplied/USD/{Accounts.PAYABLE}")
|
||||
self.assertEqual(response.status_code, 200)
|
||||
|
||||
response = self.client.get(
|
||||
f"{PREFIX}/unapplied/USD/{Accounts.PAYABLE}/all-time?as=csv")
|
||||
f"{PREFIX}/unapplied/USD/{Accounts.PAYABLE}?as=csv")
|
||||
self.assertEqual(response.status_code, 200)
|
||||
self.assertEqual(response.headers["Content-Type"], CSV_MIME)
|
||||
|
||||
@ -426,11 +426,11 @@ class ReportTestCase(unittest.TestCase):
|
||||
self.assertEqual(response.headers["Content-Type"], CSV_MIME)
|
||||
|
||||
response = self.client.get(
|
||||
f"{PREFIX}/unmatched/USD/{Accounts.PAYABLE}/all-time")
|
||||
f"{PREFIX}/unmatched/USD/{Accounts.PAYABLE}")
|
||||
self.assertEqual(response.status_code, 200)
|
||||
|
||||
response = self.client.get(
|
||||
f"{PREFIX}/unmatched/USD/{Accounts.PAYABLE}/all-time?as=csv")
|
||||
f"{PREFIX}/unmatched/USD/{Accounts.PAYABLE}?as=csv")
|
||||
self.assertEqual(response.status_code, 200)
|
||||
self.assertEqual(response.headers["Content-Type"], CSV_MIME)
|
||||
|
||||
|
@ -129,7 +129,7 @@ class UnmatchedOffsetTestCase(unittest.TestCase):
|
||||
with self.app.app_context():
|
||||
account = Account.find_by_code(Accounts.RECEIVABLE)
|
||||
assert account is not None
|
||||
matcher = OffsetMatcher(currency, account, None)
|
||||
matcher = OffsetMatcher(currency, account)
|
||||
self.assertEqual({x.id for x in matcher.unapplied},
|
||||
{data.l_r_or1d.id, data.l_r_or2d.id,
|
||||
data.l_r_or3d.id, data.l_r_or4d.id})
|
||||
@ -157,7 +157,7 @@ class UnmatchedOffsetTestCase(unittest.TestCase):
|
||||
with self.app.app_context():
|
||||
account = Account.find_by_code(Accounts.RECEIVABLE)
|
||||
assert account is not None
|
||||
matcher = OffsetMatcher(currency, account, None)
|
||||
matcher = OffsetMatcher(currency, account)
|
||||
self.assertEqual({x.id for x in matcher.unapplied},
|
||||
{data.l_r_or1d.id, data.l_r_or2d.id,
|
||||
data.l_r_or3d.id})
|
||||
@ -179,7 +179,7 @@ class UnmatchedOffsetTestCase(unittest.TestCase):
|
||||
with self.app.app_context():
|
||||
account = Account.find_by_code(Accounts.PAYABLE)
|
||||
assert account is not None
|
||||
matcher = OffsetMatcher(currency, account, None)
|
||||
matcher = OffsetMatcher(currency, account)
|
||||
self.assertEqual({x.id for x in matcher.unapplied},
|
||||
{data.l_p_or1c.id, data.l_p_or2c.id,
|
||||
data.l_p_or3c.id, data.l_p_or4c.id})
|
||||
@ -207,7 +207,7 @@ class UnmatchedOffsetTestCase(unittest.TestCase):
|
||||
with self.app.app_context():
|
||||
account = Account.find_by_code(Accounts.PAYABLE)
|
||||
assert account is not None
|
||||
matcher = OffsetMatcher(currency, account, None)
|
||||
matcher = OffsetMatcher(currency, account)
|
||||
self.assertEqual({x.id for x in matcher.unapplied},
|
||||
{data.l_p_or1c.id, data.l_p_or2c.id,
|
||||
data.l_p_or3c.id})
|
||||
@ -250,7 +250,7 @@ class UnmatchedOffsetTestCase(unittest.TestCase):
|
||||
with self.app.app_context():
|
||||
account = Account.find_by_code(Accounts.RECEIVABLE)
|
||||
assert account is not None
|
||||
matcher = OffsetMatcher(currency, account, None)
|
||||
matcher = OffsetMatcher(currency, account)
|
||||
self.assertEqual({x.id for x in matcher.unapplied},
|
||||
{data.l_r_or1d.id, data.l_r_or3d.id,
|
||||
data.l_r_or4d.id, data.l_r_or5d.id,
|
||||
@ -285,7 +285,7 @@ class UnmatchedOffsetTestCase(unittest.TestCase):
|
||||
with self.app.app_context():
|
||||
account = Account.find_by_code(Accounts.RECEIVABLE)
|
||||
assert account is not None
|
||||
matcher = OffsetMatcher(currency, account, None)
|
||||
matcher = OffsetMatcher(currency, account)
|
||||
self.assertEqual({x.id for x in matcher.unapplied},
|
||||
{data.l_r_or5d.id, data.l_r_or6d.id})
|
||||
self.assertEqual({x.id for x in matcher.unmatched},
|
||||
@ -316,7 +316,7 @@ class UnmatchedOffsetTestCase(unittest.TestCase):
|
||||
with self.app.app_context():
|
||||
account = Account.find_by_code(Accounts.PAYABLE)
|
||||
assert account is not None
|
||||
matcher = OffsetMatcher(currency, account, None)
|
||||
matcher = OffsetMatcher(currency, account)
|
||||
self.assertEqual({x.id for x in matcher.unapplied},
|
||||
{data.l_p_or1c.id, data.l_p_or3c.id,
|
||||
data.l_p_or4c.id, data.l_p_or5c.id,
|
||||
@ -351,7 +351,7 @@ class UnmatchedOffsetTestCase(unittest.TestCase):
|
||||
with self.app.app_context():
|
||||
account = Account.find_by_code(Accounts.PAYABLE)
|
||||
assert account is not None
|
||||
matcher = OffsetMatcher(currency, account, None)
|
||||
matcher = OffsetMatcher(currency, account)
|
||||
self.assertEqual({x.id for x in matcher.unapplied},
|
||||
{data.l_p_or5c.id, data.l_p_or6c.id})
|
||||
self.assertEqual({x.id for x in matcher.unmatched},
|
||||
|
Reference in New Issue
Block a user