3
0
Fork 0

fix: use wutta hint from model if present, for rows title

This commit is contained in:
Lance Edgar 2026-02-13 10:07:46 -06:00
parent fce7002675
commit a83e53afad
2 changed files with 10 additions and 0 deletions

View file

@ -363,6 +363,11 @@ class TestMasterView(WebTestCase):
with patch.object(mod.MasterView, "row_model_class", new=MyModel):
self.assertEqual(mod.MasterView.get_row_model_title(), "Dinosaur")
# model class may have wutta hint
MyModel.__wutta_hint__ = {"model_title": "T-Rex"}
with patch.object(mod.MasterView, "row_model_class", new=MyModel):
self.assertEqual(mod.MasterView.get_row_model_title(), "T-Rex")
def test_get_row_model_title_plural(self):
# error by default (since no model class)