def setup(self):
self.mock_sess = Mock(spec_set=Session)
self.cls = BiweeklyPayPeriod(date(2017, 3, 7), self.mock_sess)
m_account = Mock(name='foo')
type(m_account).name = 'foo'
m_budget = Mock(name='bar')
type(m_budget).name = 'bar'
self.m_st = Mock(
spec_set=ScheduledTransaction,
id=123,
description='desc',
amount=Decimal('123.45'),
account_id=2,
account=m_account,
budget_id=3,
budget=m_budget
)
评论列表
文章目录