Beispiel #1
0
    def test_prettify(self):
        self.assertEqual(
            prettify_entry(self.element), """\
Name    : Soccer Shoes
Value   : -123.45
Date    : 04-01
Category: Sport Equipment""")
Beispiel #2
0
    def test_prettify(self):
        self.assertEqual(
            prettify_entry(self.element,
                           default_category=CategoryEntry.DEFAULT_NAME), """\
Name    : Soccer Shoes
Value   : -123.45
Date    : 04-01
Category: Sport Equipment""")
Beispiel #3
0
    def test_prettify(self):
        self.assertEqual(
            prettify_entry(self.element, True), """\
Name     : Retirement Money
Value    : 567.0
Frequency: Monthly
Start    : 01-01
End      : 12-31
Category : Income""")
Beispiel #4
0
    def test_prettify(self):
        self.assertEqual(
            prettify_entry(self.element,
                           default_category=CategoryEntry.DEFAULT_NAME), """\
Name     : Retirement Money
Value    : 567.0
Frequency: Monthly
Start    : 01-01
End      : 12-31
Category : Income""")
Beispiel #5
0
    def test_prettify_default_category(self):
        element = self.element.copy()
        element["category"] = None
        self.assertEqual(
            prettify_entry(element,
                           default_category=CategoryEntry.DEFAULT_NAME), """\
Name    : Soccer Shoes
Value   : -123.45
Date    : 04-01
Category: {}""".format(CategoryEntry.DEFAULT_NAME.capitalize()))