예제 #1
0
    def format_posts(self, posts):
        new_posts = []

        for post in posts:
            post['date'] = int(time.mktime(post['date'].timetuple()))
            #post['attachments'] = ''

            new_posts.append(camel_case_dict(post))

        return new_posts
예제 #2
0
    def test_1(self):
        source = {'t_t': 1, 'repost_like_ratio': 80}
        end = camel_case_dict(source)

        self.assertEqual(end, {'tT': 1, 'repostLikeRatio': 80})