예제 #1
0
    def send_posts_to_contact(self, client, contact, now, date):
        '''
        Send microposts from last month to given contact.
        '''
        microposts = MicroPostManager.get_mine(
                startKey=date_util.get_db_date_from_date(now),
                endKey=date_util.get_db_date_from_date(date))

        for micropost in microposts:
            if tags_match(micropost, contact):
                body = micropost.toJson(localized=False)

                client.post(contact, MICROPOST_PATH, body,
                            self.onContactResponse)
예제 #2
0
def when_i_retrieve_my_last_posts(step):
    world.microposts = MicroPostManager.get_mine().all()
예제 #3
0
def when_i_retrieve_my_last_posts(step):
    world.microposts = MicroPostManager.get_mine().all()