Beispiel #1
0
 def create_item(_id, item_name, description):
     """method used to create bucketlist items"""
     data_ = Data.get_the_data(_id, Data.bucketlists)
     for data in data_:
         bucketlist = Bucketlist(data['title'],
                                 data['owner'],
                                 data['intro'],
                                 data['owner_id'],
                                 data['_id'])
         bucketlist.new_item(item_name=item_name,
                             description=description)
Beispiel #2
0
 def test_new_item(self):
     bucket1 = Bucketlist('bucket 1',
                          'sammy',
                          'test intro',
                          '528drrdd9540dab149eceedb14',
                          _id=None)
     bucket1.new_item('dancing in town',
                      'the description',
                      date=datetime.datetime.utcnow())
     result = self.data.get_the_data('528drrdd9540dab149eceedb14',
                                     self.data.items)
     self.assertIsInstance(result, list)