Exemplo n.º 1
0
    def test_taxonomy_term_exists_ok(self):
        data = {
            'name': 'new-term-test',
            'label': 'New Term',
            'uri': 'http://localhost.local/newest-term',
            'taxonomy_id': TestValidators.taxonomies[0]['id'],
        }
        res = logic.get_action('taxonomy_term_create')(
            TestValidators.sysadmin_context, data)

        val = taxonomy_term_exists("http://localhost.local/newest-term",
                                   TestValidators.normal_context)
        assert val == "http://localhost.local/newest-term"
    def test_taxonomy_term_exists_ok(self):
        data = {
            'name': 'new-term-test',
            'label': 'New Term',
            'uri': 'http://localhost.local/newest-term',
            'taxonomy_id': TestValidators.taxonomies[0]['id'],
        }
        res = logic.get_action('taxonomy_term_create')(
            TestValidators.sysadmin_context,
            data)

        val = taxonomy_term_exists(
            "http://localhost.local/newest-term",
            TestValidators.normal_context
        )
        assert val == "http://localhost.local/newest-term"
 def test_taxonomy_term_no_value(self):
     val = taxonomy_term_exists(
         "",
         TestValidators.normal_context
     )
 def test_taxonomy_term_missing(self):
     val = taxonomy_term_exists(
         "http://localhost.local/made-up-uri",
         TestValidators.normal_context
     )
Exemplo n.º 5
0
 def test_taxonomy_term_no_value(self):
     val = taxonomy_term_exists("", TestValidators.normal_context)
Exemplo n.º 6
0
 def test_taxonomy_term_missing(self):
     val = taxonomy_term_exists("http://localhost.local/made-up-uri",
                                TestValidators.normal_context)