summaryrefslogtreecommitdiff
path: root/addons/event/test/process/event_draft2done.yml
diff options
context:
space:
mode:
authorRaphael Collet <rco@openerp.com>2014-07-06 16:44:26 +0200
committerAntony Lesuisse <al@openerp.com>2014-07-06 17:05:41 +0200
commitcbe2dbb672a6c55d86f2e515f9d1cdfee426ef80 (patch)
treed6ff62b719fce32392397783c961b734b1e4c50e /addons/event/test/process/event_draft2done.yml
parentd78192c489d3be66cd6487b39f5ce7ba4733a187 (diff)
[MERGE] new v8 api by rco
A squashed merge is required as the conversion of the apiculture branch from bzr to git was not correctly done. The git history contains irrelevant blobs and commits. This branch brings a lot of changes and fixes, too many to list exhaustively. - New orm api, objects are now used instead of ids - Environements to encapsulates cr uid context while maintaining backward compatibility - Field compute attribute is a new object oriented way to define function fields - Shared browse record cache - New onchange protocol - Optional copy flag on fields - Documentation update - Dead code cleanup - Lots of fixes
Diffstat (limited to 'addons/event/test/process/event_draft2done.yml')
-rw-r--r--addons/event/test/process/event_draft2done.yml116
1 files changed, 57 insertions, 59 deletions
diff --git a/addons/event/test/process/event_draft2done.yml b/addons/event/test/process/event_draft2done.yml
index e1ad32ab8da..0cec9c3b16a 100644
--- a/addons/event/test/process/event_draft2done.yml
+++ b/addons/event/test/process/event_draft2done.yml
@@ -4,128 +4,126 @@
!context
uid: 'res_users_eventuser'
-
- I want to organize an event,
- into this conference I should create two registration.
+ I want to organize an event, into this conference I should create two registration.
One confirmed and attended the event and the other cancelled.
I create an event
-
!record {model: event.event, id: event_event}:
- name: event
- date_begin: 2012-01-01 19:05:15
- date_end: 2012-01-01 20:05:15
- seats_max: 10
+ name: event
+ date_begin: 2012-01-01 19:05:15
+ date_end: 2012-01-01 20:05:15
+ seats_max: 10
-
I create a registration for the event
-
!record {model: event.registration, id: event_registration1}:
- event_id: event_event
- name: test_confirm
- nb_register: 10
+ event_id: event_event
+ name: test_confirm
+ nb_register: 10
-
I create a second registration for the same event
-
- !record {model: event.registration, id: event_registration2}:
+ !record {model: event.registration, id: event_registration2}:
event_id: event_event
name: test_cancel
nb_register: 5
-
I check if the number of draft registrations in the event view is correct
-
- !assert {model: event.event, id: event_event ,string: 'the number of draft registration is not correct'}:
- - seats_unconfirmed == 15.00
+ !assert {model: event.event, id: event_event, string: 'the number of draft registration is not correct'}:
+ - seats_unconfirmed == 15.00
-
- I confirm the registration1
+ I confirm the registration1
-
- !python {model: event.registration}: |
- event_pool = self.pool.get("event.event")
- self.registration_open(cr, uid, [ref("event_registration1")],context=context)
+ !python {model: event.registration, id: event_registration1}: |
+ self.registration_open()
-
- I check that registration is "confirmed"
+ I check that registration is "confirmed"
-
- !assert {model: event.registration, id: event_registration1}:
- - state == 'open', "registration should be confirmed."
+ !assert {model: event.registration, id: event_registration1}:
+ - state == 'open', "registration should be confirmed."
-
- I check if the number of confirmed registration is correct
+ I check if the number of confirmed registration is correct
-
- !assert {model: event.event,id: event_event,string: 'the number of confirmed registration is not correct'}:
- - seats_reserved == 10.00
+ !assert {model: event.event, id: event_event,string: 'the number of confirmed registration is not correct'}:
+ - seats_reserved == 10.00
-
- I close the registration
+ I close the registration
-
- !python {model: event.registration}: |
- self.button_reg_close(cr, uid, [ref("event_registration1")],context=context)
+ !python {model: event.registration, id: event_registration1}: |
+ self.button_reg_close()
-
- I check if registration is correctly finnished
+ I check if registration is correctly finnished
-
!assert {model: event.registration, id: event_registration1}:
- - state == 'done'
+ - state == 'done'
-
- I check if attended registration is correct
+ I check if attended registration is correct
-
- !assert {model: event.event,id: event_event,string: 'the number of registration that attended the event is not correct'}:
- - seats_used == 10.00
+ !assert {model: event.event, id: event_event, string: 'the number of registration that attended the event is not correct'}:
+ - seats_used == 10.00
-
- I cancel the second registration
+ I cancel the second registration
-
- !python {model: event.registration}: |
- self.button_reg_cancel(cr, uid, [ref("event_registration2")],context=context)
+ !python {model: event.registration, id: event_registration2}: |
+ self.button_reg_cancel()
-
- I Check that registration is cancelled
+ I Check that registration is cancelled
-
!assert {model: event.registration, id: event_registration2}:
- state == 'cancel', "Registration should be cancelled."
-
- I confirm the event
+ I confirm the event
-
- !python {model: event.event}: |
- self.button_confirm(cr, uid, [ref("event_event")])
+ !python {model: event.event, id: event_event}: |
+ self.button_confirm()
-
- I check that event is in "confirmed" state.
+ I check that event is in "confirmed" state.
-
!assert {model: event.event, id: event_event}:
- state == 'confirm', "event should be confirmed."
-
- I close the event
+ I close the event
-
- !python {model: event.event}: |
- self.button_done(cr, uid, [ref("event_event")])
+ !python {model: event.event, id: event_event}: |
+ self.button_done()
-
- Check that event is in "close" state.
+ Check that event is in "close" state.
-
!assert {model: event.event, id: event_event}:
- state == 'done', "Event should be Closed."
-
- I reset event to draft
+ I reset event to draft
-
- !python {model: event.event}: |
- self.button_draft(cr, uid, [ref("event_event")])
+ !python {model: event.event, id: event_event}: |
+ self.button_draft()
-
- In order to test the cancellation of the event, I create a second event
+ In order to test the cancellation of the event, I create a second event
-
!record {model: event.event, id: event_event1}:
- name: event_cancel
- date_begin: 2012-01-01 19:05:15
- date_end: 2012-01-01 20:05:15
+ name: event_cancel
+ date_begin: 2012-01-01 19:05:15
+ date_end: 2012-01-01 20:05:15
-
I create a registration for the event
-
!record {model: event.registration, id: event_registration_cancel}:
- event_id: event_event1
- name: test_confirm_again
- nb_register: 5
+ event_id: event_event1
+ name: test_confirm_again
+ nb_register: 5
-
- Now I cancel this event
+ Now I cancel this event
-
- !python {model: event.event}: |
- self.button_cancel(cr, uid, [ref("event_event1")])
+ !python {model: event.event, id: event_event1}: |
+ self.button_cancel()
-
- I check if the event is cancelled
+ I check if the event is cancelled
-
!assert {model: event.event, id: event_event1}:
- - state == 'cancel', "Event should be cancelled."
+ - state == 'cancel', "Event should be cancelled."
-
- I check if its registrations are cancelled too
+ I check if its registrations are cancelled too
-
!assert {model: event.registration, id: event_registration_cancel}:
- - state == 'cancel', "Registration should be cancelled."
+ - state == 'cancel', "Registration should be cancelled."