diff options
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..ae572af --- /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', 'FF42FF', '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)) |