~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-24 12:55:20 UTC
  • Revision ID: mihirsoni.123@gmail.com-20141024125520-4qc4mx0p39z13ysa
Added time picker

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 
17
17
import uuid
18
18
import datetime
 
19
from datetime import timedelta
19
20
 
20
21
 
21
22
class DataMixin(object):
40
41
    def __init__(
41
42
            self,
42
43
            startDate,
 
44
            startTime,
43
45
            endDate,
 
46
            endTime,
44
47
            calendar,
45
48
            name,
46
49
            description,
50
53
        # reminders. --elopio - 2014-06-26
51
54
        super(Event, self).__init__()
52
55
        self.startDate = startDate
 
56
        self.startTime = startTime
53
57
        self.endDate = endDate
 
58
        self.endTime = endTime
54
59
        self.calendar = calendar
55
60
        self.name = name
56
61
        self.description = description
63
68
        if unique_id is None:
64
69
            unique_id = str(uuid.uuid1())
65
70
        startDate = datetime.datetime.now()
 
71
        startTime = datetime.datetime.now()
66
72
        endDate = datetime.datetime.now()
 
73
        endTime = datetime.datetime.now() + timedelta(hours=1)
67
74
        calendar = 'Personal'
68
75
        name = 'Test event {}'.format(unique_id)
69
76
        description = 'Test description {}.'.format(unique_id)
71
78
        guests = ['UX User']
72
79
        return cls(
73
80
            startDate,
 
81
            startTime,
74
82
            endDate,
 
83
            endTime,
75
84
            calendar,
76
85
            name,
77
86
            description,