diff options
author | 2012-06-03 13:02:54 +0200 | |
---|---|---|
committer | 2012-06-03 13:02:54 +0200 | |
commit | 897671db979e64754de2c53cbbe83fcbae37bb02 (patch) | |
tree | 11ac9ede303971d2bcaf270d833fd4112c923509 /pygithub3/tests/resources/test_issues.py | |
parent | Merge 'services/orgs' (diff) | |
parent | Change "Edit" to "Update" in docstring (diff) | |
download | python-github3-897671db979e64754de2c53cbbe83fcbae37bb02.tar.xz python-github3-897671db979e64754de2c53cbbe83fcbae37bb02.zip |
Merge branch 'services/issues' of https://github.com/alejandrogomez/python-github3 into services/issues
Conflicts:
docs/services.rst
pygithub3/github.py
pygithub3/requests/repos/__init__.py
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)) |