@carltongibson Hey, this forum thingie looks cool!
Anyway, my first question is whether there’s an appropriate or prefered location for the test.
First, there’s tests.admin_checks.tests, which appears to be the location for all the AdminSite-related tests. (That’s my thought on where it belongs.)
But, the method in question, get_admin_url, is tested for use by readonly foreign key fields in
test_readonly_foreignkey_links in tests.admin_views.test.
Then there’s a third idea where the test being created is more directly targeted at just the get_admin_url method within the AdminReadonlyField class and tests this class / method directly. (The other tests test this through the use of the
reverse function) There are no tests focusing strictly on this class, so I’m guessing there’s some reason for that - perhaps that it’s considered well-tested within the context of the admin classes.
Thoughts? (Am I overthinking this? Wouldn’t be the first time…)