fixed choices

This commit is contained in:
Cayo Puigdefabregas 2021-02-08 15:31:15 +01:00 committed by Santiago Lamora
parent c010c10157
commit a53b71bab1
1 changed files with 2 additions and 2 deletions

View File

@ -12,7 +12,7 @@ class RouterTests(BaseTestCase):
def test_list_backends(self):
# TODO count actual, register and compare
choices = list(Route._meta.get_field('backend')._choices)
choices = list(Route._meta.get_field('backend').choices)
self.assertLess(1, len(choices))
def test_get_instances(self):
@ -25,7 +25,7 @@ class RouterTests(BaseTestCase):
pass
choices = backends.ServiceBackend.get_choices()
Route._meta.get_field('backend')._choices = choices
Route._meta.get_field('backend').choices = choices
backend = TestBackend.get_name()
route = Route.objects.create(backend=backend, host=self.host, match='True')