Added support for colorpickers
This commit is contained in:
parent
e8e0839884
commit
bf8b11287e
7 changed files with 2953 additions and 0 deletions
21
tests/colorfieldtest.py
Normal file
21
tests/colorfieldtest.py
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
from settings import config
|
||||
from paramecio.cromosoma.extrafields.colorfield import ColorField
|
||||
import unittest
|
||||
|
||||
class TestFieldMethods(unittest.TestCase):
|
||||
|
||||
def test_colorfield(self):
|
||||
|
||||
colorfield=ColorField('color', '')
|
||||
|
||||
value=colorfield.check('#ff00ff')
|
||||
|
||||
self.assertEqual(16711935, value)
|
||||
|
||||
value=colorfield.check('#ff00fff')
|
||||
|
||||
self.assertEqual(0, value)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
Loading…
Add table
Add a link
Reference in a new issue