diff options
author | zsloan | 2018-04-13 15:47:42 +0000 |
---|---|---|
committer | zsloan | 2018-04-13 15:47:42 +0000 |
commit | eb24f53d7f5210ead3748772bb4126f78520f32c (patch) | |
tree | e58268dc13fb494818095021bf5e8510da6f7684 /test/unittest/test_registration.py | |
parent | 9276e5eee9be7ed37fda5ea88aec2f1a238864ad (diff) | |
parent | 270f86c41f7c90cc4ca51bca0aec789a09a36a0e (diff) | |
download | genenetwork2-eb24f53d7f5210ead3748772bb4126f78520f32c.tar.gz |
Resolved conflicts for pulling from testing branch
Diffstat (limited to 'test/unittest/test_registration.py')
-rw-r--r-- | test/unittest/test_registration.py | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/test/unittest/test_registration.py b/test/unittest/test_registration.py new file mode 100644 index 00000000..98d0cdff --- /dev/null +++ b/test/unittest/test_registration.py @@ -0,0 +1,27 @@ +# Run test with something like +# +# env GN2_PROFILE=~/opt/gn-latest GENENETWORK_FILES=$HOME/gn2_data ./bin/genenetwork2 ./etc/default_settings.py -c ../test/unittest/test_registration.py +# + +import unittest +import mock.es_double as es +from wqflask.user_manager import RegisterUser + +class TestRegisterUser(unittest.TestCase): + def setUp(self): + self.es = es.ESDouble() + + def testRegisterUserWithCorrectData(self): + data = { + "email_address": "user@example.com" + , "full_name": "A.N. Other" + , "organization": "Some Organisation" + , "password": "testing" + , "password_confirm": "testing" + , "es_connection": self.es + } + result = RegisterUser(data) + self.assertEqual(len(result.errors), 0, "Errors were not expected") + +if __name__ == "__main__": + unittest.main() |