Ejemplo n.º 1
0
    def test_keywords_to_str(self):
        """String representation of keywords works."""

        keywords = {
            'category': 'hazard', 'subcategory': 'tsunami', 'unit': 'm'}
        string_keywords = keywords_to_str(keywords)
        for key in keywords:
            message = (
                'Expected key %s to appear in %s' % (key, string_keywords))
            assert key in string_keywords, message

            val = keywords[key]
            message = (
                'Expected value %s to appear in %s' % (val, string_keywords))
            assert val in string_keywords, message
Ejemplo n.º 2
0
    def test_keywords_to_str(self):
        """String representation of keywords works
        """

        kwds = {'category': 'hazard', 'subcategory': 'tsunami', 'unit': 'm'}

        s = keywords_to_str(kwds)
        #print
        #print s
        for key in kwds:
            msg = ('Expected key %s to appear in %s' % (key, s))
            assert key in s, msg

            val = kwds[key]
            msg = ('Expected value %s to appear in %s' % (val, s))
            assert val in s, msg
Ejemplo n.º 3
0
    def test_keywords_to_str(self):
        """String representation of keywords works."""

        keywords = {
            'category': 'hazard',
            'subcategory': 'tsunami',
            'unit': 'm'
        }
        string_keywords = keywords_to_str(keywords)
        for key in keywords:
            message = ('Expected key %s to appear in %s' %
                       (key, string_keywords))
            assert key in string_keywords, message

            val = keywords[key]
            message = ('Expected value %s to appear in %s' %
                       (val, string_keywords))
            assert val in string_keywords, message
Ejemplo n.º 4
0
    def test_keywords_to_str(self):
        """String representation of keywords works
        """

        kwds = {'category': 'hazard',
                'subcategory': 'tsunami',
                'unit': 'm'}

        s = keywords_to_str(kwds)
        #print
        #print s
        for key in kwds:
            msg = ('Expected key %s to appear in %s' % (key, s))
            assert key in s, msg

            val = kwds[key]
            msg = ('Expected value %s to appear in %s' % (val, s))
            assert val in s, msg