Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
3562 Weergaven

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
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
0
mrt. 25
1323
4
apr. 24
174176
0
dec. 23
2105
0
okt. 23
1177
0
okt. 23
1953