diff options
| author | 2012-04-27 13:50:25 +0200 | |
|---|---|---|
| committer | 2012-05-27 19:54:29 +0200 | |
| commit | 837c07729c089b8c5fdf3828cedff054b0cf1dde (patch) | |
| tree | 3afcb0ab80782c22d74baeae803a369c8886eea0 /pygithub3/tests/resources/test_issues.py | |
| parent | Labels and Milestones services added (diff) | |
| download | python-github3-837c07729c089b8c5fdf3828cedff054b0cf1dde.tar.xz python-github3-837c07729c089b8c5fdf3828cedff054b0cf1dde.zip | |
test Label validation errors
Diffstat (limited to 'pygithub3/tests/resources/test_issues.py')
| -rw-r--r-- | pygithub3/tests/resources/test_issues.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/pygithub3/tests/resources/test_issues.py b/pygithub3/tests/resources/test_issues.py new file mode 100644 index 0000000..0bef3c1 --- /dev/null +++ b/pygithub3/tests/resources/test_issues.py @@ -0,0 +1,17 @@ +#!/usr/bin/env python +# -*- encoding: utf-8 -*- + +from unittest import TestCase + +from pygithub3.resources.issues import Label + + +class TestLabel(TestCase): + def test_is_valid_color(self): + valid_colors = ['BADA55', 'FFFFFF', '45DFCA'] + for color in valid_colors: + self.assertTrue(Label.is_valid_color(color)) + + invalid_colors = ['BDA55', '#FFAABB', 'FFf'] + for color in invalid_colors: + self.assertFalse(Label.is_valid_color(color)) |
