def test_journal_from(self): self.assertParse( qp.Journal( None, None, qp.From( qp.Equal(qp.Column('date'), qp.Constant(datetime.date(2014, 1, 1))), None, True, None)), "JOURNAL FROM date = 2014-01-01 CLOSE;")
def test_journal_account_and_summary(self): self.assertParse("JOURNAL 'Assets:Foo' AT cost;", qp.Journal('Assets:Foo', 'cost', None))
def test_journal_summary(self): self.assertParse("JOURNAL AT cost;", qp.Journal(None, 'cost', None))
def test_journal_account(self): self.assertParse("JOURNAL 'Assets:Checking';", qp.Journal('Assets:Checking', None, None))
def test_journal_empty(self): self.assertParse("JOURNAL;", qp.Journal(None, None, None))
def test_explain_journal(self): self.assertParse( qp.Explain(qp.Journal('Assets:ETrade', 'units', None)), "EXPLAIN JOURNAL 'Assets:ETrade' AT units;")
def test_journal_account_and_summary(self): self.assertParse(qp.Journal('Assets:Checking', 'cost', None), "JOURNAL 'Assets:Checking' AT cost;")