incubator-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r1488835 [3/3] - in /incubator/public/trunk/tools: ./ bin/ src/asf/ src/asf/utils/ tests/ tests/data/
Date Mon, 03 Jun 2013 03:47:53 GMT
Added: incubator/public/trunk/tools/tests/test_committers.py
URL: http://svn.apache.org/viewvc/incubator/public/trunk/tools/tests/test_committers.py?rev=1488835&view=auto
==============================================================================
--- incubator/public/trunk/tools/tests/test_committers.py (added)
+++ incubator/public/trunk/tools/tests/test_committers.py Mon Jun  3 03:47:50 2013
@@ -0,0 +1,38 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+from nose.plugins.attrib import attr
+
+from asf.utils.auth import get_username, get_password, AUTH_SECTION
+from asf.utils.committers import get_committer
+from asf.utils.test import ensure_credentials_stored
+
+
+@attr('integration')
+@ensure_credentials_stored
+def test_get_committer(username, password):
+    committer = get_committer('adc', username, password)
+
+    assert committer.username == 'adc'
+    assert isinstance(committer.member, bool)
+    assert committer.fullname == 'Alan Cabrera'
+    assert 'incubator' in committer.committees
+    assert 'geronimo' in committer.projects
+    assert 'chukwa' in committer.mentoring
+
+    assert committer is get_committer('adc', username, password)

Added: incubator/public/trunk/tools/tests/test_emails.py
URL: http://svn.apache.org/viewvc/incubator/public/trunk/tools/tests/test_emails.py?rev=1488835&view=auto
==============================================================================
--- incubator/public/trunk/tools/tests/test_emails.py (added)
+++ incubator/public/trunk/tools/tests/test_emails.py Mon Jun  3 03:47:50 2013
@@ -0,0 +1,45 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+from nose.plugins.attrib import attr
+
+from asf.utils.emails import aliases_for, email_from_alias, canonical_email_address, is_apache_email_address,
get_mail_aliases
+from asf.utils.test import ensure_credentials_stored
+
+
+def test_canonical_email_address():
+    assert 'jim@jagunet.com' == canonical_email_address('jim@jaguNET.com')
+
+
+def test_is_apache_email_address():
+    assert is_apache_email_address('adc@ApAcHe.org')
+
+
+@attr('integration')
+@ensure_credentials_stored
+def test_aliases_for(username, password):
+    aliases = aliases_for('adc@ApAcHe.org', get_mail_aliases(username, password))
+    assert 'adc@toolazydogs.com' in aliases
+    assert 'list@toolazydogs.com' in aliases
+    assert 'alan.cabrera@gmail.com' in aliases
+
+
+@attr('integration')
+@ensure_credentials_stored
+def test_email_from_alias(username, password):
+    assert email_from_alias('list@toolazydogs.com', get_mail_aliases(username, password))
== 'adc@apache.org'



---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@incubator.apache.org
For additional commands, e-mail: cvs-help@incubator.apache.org


Mime
View raw message