ATTIC/attic/audit/lib/models.py
def update_from_coverage(cls, rows):
        # method, url, **kwargs):
        """
        Gets or creates a coverage entry

        :param cls: The actual entity class
        :param method: Endpoint HTTP method
        :param url: Endpoint URL

        Optional args:
        - conformance
        - testfile
        - questions
        - tags
        """
        for data in rows:
            method = data.pop('method')
            url = data.pop('url')
            obj, created = cls.get_or_create(method=method, url=url)
            # if created:
            #     print "Created", method, url
            obj.set(**data)
        commit()
        return obj

        Gets or creates a coverage entry

        :param cls: The actual entity class
        :param method: Endpoint HTTP method
        :param url: Endpoint URL

        Optional args:
        - conformance
        - testfile
        - questions
        - tags
        
Gets or creates a coverage entry
Gets or creates a coverage entry
def update_from_coverage(cls, rows):
        for data in rows:
            method = data.pop('method')
            url = data.pop('url')
            obj, created = cls.get_or_create(method=method, url=url)
            obj.set(**data)
        commit()
        return obj
def update_from_coverage ( cls , rows ) : for data in rows : method = data . pop ( 'method' ) url = data . pop ( 'url' ) obj , created = cls . get_or_create ( method = method , url = url ) obj . set ( ** data ) commit ( ) return obj
Gets or creates a coverage entry
Gets or creates a coverage entry
# method, url, **kwargs): """
        Gets or creates a coverage entry

        :param cls: The actual entity class
        :param method: Endpoint HTTP method
        :param url: Endpoint URL

        Optional args:
        - conformance
        - testfile
        - questions
        - tags
        """ # if created: #     print "Created", method, url
cls
The actual entity class
The actual entity class
rows
method
Endpoint HTTP method
Endpoint HTTP method
url
Endpoint URL
Optional args:
conformance
testfile
questions
tags
Endpoint URL Optional args : conformance testfile questions tags