fix: add basic execution methods for batch handler
also logic for batch data files, and deletion
This commit is contained in:
parent
a514d9cfba
commit
3585eca65b
8 changed files with 402 additions and 2 deletions
|
@ -434,6 +434,14 @@ app_title = WuttaTest
|
|||
dt = datetime.datetime(2024, 12, 11, 8, 30, tzinfo=datetime.timezone.utc)
|
||||
self.assertEqual(self.app.render_datetime(dt), '2024-12-11 08:30+0000')
|
||||
|
||||
def test_render_time_ago(self):
|
||||
with patch.object(mod, 'humanize') as humanize:
|
||||
humanize.naturaltime.return_value = 'now'
|
||||
now = datetime.datetime.now()
|
||||
result = self.app.render_time_ago(now)
|
||||
self.assertEqual(result, 'now')
|
||||
humanize.naturaltime.assert_called_once_with(now)
|
||||
|
||||
def test_get_person(self):
|
||||
people = self.app.get_people_handler()
|
||||
with patch.object(people, 'get_person') as get_person:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue