File: func_noerror_uuid_field.py

package info (click to toggle)
pylint-django 2.0.13-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 660 kB
  • sloc: python: 1,807; sh: 13; makefile: 5
file content (19 lines) | stat: -rw-r--r-- 576 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
"""
Checks that Pylint does not complain about UUID fields.
"""
#  pylint: disable=C0111,W5101
from __future__ import print_function
from django.db import models


class LotsOfFieldsModel(models.Model):
    uuidfield = models.UUIDField()

    def uuidfield_tests(self):
        print(self.uuidfield.bytes)
        print(self.uuidfield.bytes_le)
        print(self.uuidfield.fields[2])
        print(self.uuidfield.hex)
        # print(self.uuidfield.int)  # Don't know how to properly check this one
        print(self.uuidfield.variant)
        print(self.uuidfield.version)