You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@labs.apache.org by ad...@apache.org on 2014/02/10 01:23:21 UTC
svn commit: r1566473 - in /labs/panopticon/tests: test_ldap.py test_person.py
Author: adc
Date: Mon Feb 10 00:23:20 2014
New Revision: 1566473
URL: http://svn.apache.org/r1566473
Log:
Mark those tests that require access to ASF ldap
You can then run tests on your laptop w/out a tunnel:
nosetests -v -a '!ldap'
Modified:
labs/panopticon/tests/test_ldap.py
labs/panopticon/tests/test_person.py
Modified: labs/panopticon/tests/test_ldap.py
URL: http://svn.apache.org/viewvc/labs/panopticon/tests/test_ldap.py?rev=1566473&r1=1566472&r2=1566473&view=diff
==============================================================================
--- labs/panopticon/tests/test_ldap.py (original)
+++ labs/panopticon/tests/test_ldap.py Mon Feb 10 00:23:20 2014
@@ -16,12 +16,14 @@
# specific language governing permissions and limitations
# under the License.
#
+from nose.plugins.attrib import attr
from nose.tools import assert_equals, assert_raises
from asf.data.ldap import LDAP, check_user_password
+@attr('ldap')
def test_find_by_username():
ldap = LDAP()
@@ -36,12 +38,14 @@ def test_find_by_username():
assert ldap.is_valid_account('adc')
+@attr('ldap')
def test_is_valid_account():
ldap = LDAP()
assert ldap.is_valid_account('adc')
+@attr('ldap')
def test_find_by_common_name():
ldap = LDAP()
@@ -55,5 +59,6 @@ def test_find_by_common_name():
assert ldap.is_valid_account('adc')
+@attr('ldap')
def test_check_user_password():
assert not check_user_password('adc', 'SECRET')
Modified: labs/panopticon/tests/test_person.py
URL: http://svn.apache.org/viewvc/labs/panopticon/tests/test_person.py?rev=1566473&r1=1566472&r2=1566473&view=diff
==============================================================================
--- labs/panopticon/tests/test_person.py (original)
+++ labs/panopticon/tests/test_person.py Mon Feb 10 00:23:20 2014
@@ -16,7 +16,8 @@
# specific language governing permissions and limitations
# under the License.
#
-from nose.tools import assert_equals, assert_raises
+from nose.plugins.attrib import attr
+from nose.tools import assert_equals
from asf.person import picture_url, Person
@@ -25,6 +26,7 @@ def test_picture_url():
assert_equals('https://secure.gravatar.com/avatar/e2291d07bb2caeb7337c30872259104d?r=g&d=mm', picture_url('adc@apache.org'))
+@attr('ldap')
def test_find_by_email():
person = Person.find_by_email('jim@jaguNET.com')
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@labs.apache.org
For additional commands, e-mail: commits-help@labs.apache.org