예제 #1
0
    def test_list_to_str(self):
        tags = None
        tags_str = list_to_str(tags)
        self.assertEqual(None, tags_str)

        tags = []
        tags_str = list_to_str(tags)
        self.assertEqual('', tags_str)

        tags = ['tag1', 'tag2', 'tag3']
        tags_str = list_to_str(tags)
        self.assertEqual('tag1,tag2,tag3', tags_str)
예제 #2
0
    def test_list_to_str(self):
        tags = None
        tags_str = list_to_str(tags)
        self.assertEqual(None, tags_str)

        tags = []
        tags_str = list_to_str(tags)
        self.assertEqual('', tags_str)

        tags = ['tag1', 'tag2', 'tag3']
        tags_str = list_to_str(tags)
        self.assertEqual('tag1,tag2,tag3', tags_str)
예제 #3
0
 def decode(self):
     return {
         'message': self.message,
         'teams': list_to_str(self.teams),
         'alias': self.alias,
         'description': self.description,
         'recipients': list_to_str(self.recipients),
         'actions': list_to_str(self.actions),
         'source': self.source,
         'tags': list_to_str(self.tags),
         'details': self.details,
         'entity': self.entity,
         'user': self.user,
         'note': self.note
     }
예제 #4
0
 def decode(self):
     return {
         'message': self.message,
         'teams': list_to_str(self.teams),
         'alias': self.alias,
         'description': self.description,
         'recipients': list_to_str(self.recipients),
         'actions': list_to_str(self.actions),
         'source': self.source,
         'tags': list_to_str(self.tags),
         'details': self.details,
         'entity': self.entity,
         'user': self.user,
         'note': self.note
     }
예제 #5
0
 def decode(self):
     return {
         'id': self.id,
         'alias': self.alias,
         'tags': list_to_str(self.tags),
         'user': self.user,
         'note': self.note,
         'source': self.source
     }
예제 #6
0
 def decode(self):
     return {
         'id': self.id,
         'alias': self.alias,
         'tags': list_to_str(self.tags),
         'user': self.user,
         'note': self.note,
         'source': self.source
     }
예제 #7
0
 def decode(self):
     return {
         'createdAfter': convert_from_date(self.created_after),
         'createdBefore': convert_from_date(self.created_before),
         'updatedAfter': convert_from_date(self.updated_after),
         'updatedBefore': convert_from_date(self.updated_before),
         'limit': self.limit,
         'status': self.status,
         'tags': list_to_str(self.tags),
         'tagsOperator': self.tags_operator
     }
예제 #8
0
 def decode(self):
     return {
         'createdAfter': convert_from_date(self.created_after),
         'createdBefore': convert_from_date(self.created_before),
         'updatedAfter': convert_from_date(self.updated_after),
         'updatedBefore': convert_from_date(self.updated_before),
         'limit': self.limit,
         'status': self.status,
         'tags': list_to_str(self.tags),
         'tagsOperator': self.tags_operator
     }