~mihirsoni/ubuntu-calendar-app/dateSelectNewEventTest

« back to all changes in this revision

Viewing changes to tests/autopilot/calendar_app/data.py

  • Committer: Mihir Soni
  • Date: 2014-10-23 22:44:56 UTC
  • Revision ID: mihirsoni.123@gmail.com-20141023224456-2j0wago6tbis6eyp
Date select while creating new event

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
16
16
 
17
17
import uuid
18
 
 
 
18
import datetime
19
19
 
20
20
class DataMixin(object):
21
21
 
36
36
 
37
37
    """Event data object for user acceptance tests."""
38
38
 
39
 
    def __init__(self, calendar, name, description, location, guests):
 
39
    def __init__(self, startDate,endDate,calendar, name, description, location, guests):
40
40
        # TODO add start date and end date, is all day event, recurrence and
41
41
        # reminders. --elopio - 2014-06-26
42
42
        super(Event, self).__init__()
 
43
        self.startDate = startDate
 
44
        self.endDate = endDate
43
45
        self.calendar = calendar
44
46
        self.name = name
45
47
        self.description = description
51
53
        """Return a unique event."""
52
54
        if unique_id is None:
53
55
            unique_id = str(uuid.uuid1())
 
56
        startDate = datetime.datetime.now()
 
57
        endDate = datetime.datetime.now()
54
58
        calendar = 'Personal'
55
59
        name = 'Test event {}'.format(unique_id)
56
60
        description = 'Test description {}.'.format(unique_id)
57
61
        location = 'Test location {}'.format(unique_id)
58
62
        guests = ['UX User']
59
 
        return cls(calendar, name, description, location, guests)
 
63
        return cls(startDate,endDate,calendar, name, description, location, guests)