예제 #1
0
 def test_delete(self):
     self.set_up()
     self.add_test_data()
     uebersicht_einzelbuchungen.index(
         PostRequest({
             'action': 'delete',
             'delete_index': '1'
         }))
     einzelbuchungen = viewcore.database_instance().einzelbuchungen
     assert einzelbuchungen.select().sum() == 100
예제 #2
0
 def test_getRequest_withEinnahme_shouldReturnEditLinkOfEinnahme(self):
     self.set_up()
     self.add_test_data()
     result = uebersicht_einzelbuchungen.index(GetRequest())
     item = result['alles']['2012.12'][0]
     assert float(item['wert']) > 0
     assert item['link'] == 'addeinnahme'
     item = result['alles']['2012.12'][1]
     assert float(item['wert']) < 0
     assert item['link'] == 'addausgabe'
예제 #3
0
 def test_withEntry_shouldReturnGermanDateFormat(self):
     self.set_up()
     self.add_test_data()
     result = uebersicht_einzelbuchungen.index(GetRequest())
     assert result['alles']['2012.12'][0]['datum'] == '12.12.2012'
예제 #4
0
 def test_init_filledDatabase(self):
     self.set_up()
     self.add_test_data()
     uebersicht_einzelbuchungen.index(GetRequest())
예제 #5
0
 def test_init_withEmptyDatabase(self):
     self.set_up()
     uebersicht_einzelbuchungen.index(GetRequest())