예제 #1
0
    def test_clean_tags_rest(self):
        instance = HarvesterBase()
        tags_as_str = [name for name, exp in self.munge_list]

        clean_tags = HarvesterBase._clean_tags(instance, tags_as_str)

        assert len(clean_tags) == len(tags_as_str)

        for _, exp in self.munge_list:
            assert exp in clean_tags
예제 #2
0
    def test_clean_tags_rest(self):
        instance = HarvesterBase()
        tags_as_str = [name for name,exp in self.munge_list] 
        
        clean_tags = HarvesterBase._clean_tags(instance, tags_as_str)

        assert_equal(len(clean_tags), len(tags_as_str))
        
        for _, exp in self.munge_list:
            assert_in(exp, clean_tags)
예제 #3
0
    def test_clean_tags_rest(self):
        instance = HarvesterBase()
        tags_as_str = [name for name, exp in self.munge_list]

        clean_tags = HarvesterBase._clean_tags(instance, tags_as_str)

        assert_equal(len(clean_tags), len(tags_as_str))

        for _, exp in self.munge_list:
            assert_in(exp, clean_tags)
예제 #4
0
    def test_clean_tags_package_show(self):
        instance = HarvesterBase()
        tags_as_dict =  [{u'vocabulary_id': None,
                          u'state': u'active',
                          u'display_name': name,
                          u'id': u'073080c8-fef2-4743-9c9e-6216019f8b3d',
                          u'name': name} for name,exp in self.munge_list]        

        clean_tags = HarvesterBase._clean_tags(instance, tags_as_dict)
        
        idx = 0
        for _, exp in self.munge_list:
            tag = clean_tags[idx]
            assert_equal(tag['name'], exp)
            idx += 1
예제 #5
0
    def test_clean_tags_package_show(self):
        instance = HarvesterBase()
        tags_as_dict = [{
            u'vocabulary_id': None,
            u'state': u'active',
            u'display_name': name,
            u'id': u'073080c8-fef2-4743-9c9e-6216019f8b3d',
            u'name': name
        } for name, exp in self.munge_list]

        clean_tags = HarvesterBase._clean_tags(instance, tags_as_dict)

        idx = 0
        for _, exp in self.munge_list:
            tag = clean_tags[idx]
            assert tag['name'] == exp
            idx += 1