Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
3582 Zobrazení

I want to test a controller that is supposed to create a record.

I have this unit test file:

class TestController(HttpCase):

def test_create_record(self, target_url):
response = self.url_open('/my/create_obj', data={'name': 'obay'}, timeout=100)
# after this, the object is created in the database
# but it doesn't show in the next search results
self.env['object.name'].search([]) # empty record set

Does the url_open roll back immediately after it finishes the request?


Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
0
bře 25
1334
4
dub 24
174196
0
pro 23
2119
0
říj 23
1181
0
říj 23
1971