diff options
author | 2012-06-16 13:56:29 +0200 | |
---|---|---|
committer | 2012-06-16 13:58:12 +0200 | |
commit | 107b12b3b48040488ff6ddd54cb1300200dc8b37 (patch) | |
tree | f35c57bb8b5c5cd85511aaad1c0df0e4f97c0c25 /pygithub3/tests/resources/test_issues.py | |
parent | Merge #5 'services/orgs' (diff) | |
parent | Tests on services.issues working (diff) | |
download | python-github3-107b12b3b48040488ff6ddd54cb1300200dc8b37.tar.xz python-github3-107b12b3b48040488ff6ddd54cb1300200dc8b37.zip |
Merge #12 'services/issues'
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)) |