diff --git a/eox_core/api/v1/tests/integration/data/__init__.py b/eox_core/api/v1/tests/integration/data/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/eox_core/api/v1/tests/integration/data/fake_users.py b/eox_core/api/v1/tests/integration/data/fake_users.py new file mode 100644 index 000000000..53d4d0330 --- /dev/null +++ b/eox_core/api/v1/tests/integration/data/fake_users.py @@ -0,0 +1,630 @@ +"""Fake user data for testing purposes.""" + +FAKE_USER_DATA = iter( + [ + { + "username": "athickpenny0", + "email": "athickpenny0@indiegogo.com", + "fullname": "Antoni Thickpenny", + "password": "jD3_u)67VfHce", + "activate_user": True, + "mailing_address": "70736 Haas Parkway", + "year_of_birth": 1996, + "gender": "f", + "level_of_education": "p", + "city": "Solikamsk", + "goals": "Maecenas leo odio, condimentum id", + }, + { + "username": "smenchenton1", + "email": "smenchenton1@networksolutions.com", + "fullname": "Sonia Menchenton", + "password": "hO9\\Pni)", + "activate_user": True, + "mailing_address": "7543 Eagle Crest Terrace", + "year_of_birth": 1998, + "gender": "m", + "level_of_education": "m", + "city": "Diourbel", + "goals": "Sed sagittis.", + }, + { + "username": "arealff2", + "email": "arealff2@phpbb.com", + "fullname": "Alexis Realff", + "password": 'zY2(yq!(>4"_', + "activate_user": True, + "mailing_address": "0 Grim Drive", + "year_of_birth": 2005, + "gender": "f", + "level_of_education": "b", + "city": "Gongyi", + "goals": "Proin interdum mauris non ligula pellentesque ultrices.", + }, + { + "username": "ddilon3", + "email": "ddilon3@geocities.com", + "fullname": "Dotty Dilon", + "password": 'mV9"3zRdRr#bTP', + "activate_user": True, + "mailing_address": "6859 Lerdahl Road", + "year_of_birth": 2002, + "gender": "m", + "level_of_education": "a", + "city": "La Curva", + "goals": "Morbi sem mauris, laoreet ut, rhoncus aliquet, pulvinar sed, nisl.", + }, + { + "username": "lties4", + "email": "lties4@addthis.com", + "fullname": "Loreen Ties", + "password": 'iU6@R"`/t3>/DT', + "activate_user": True, + "mailing_address": "64 Clemons Terrace", + "year_of_birth": 1994, + "gender": "f", + "level_of_education": "hs", + "city": "Xianyang", + "goals": "In est risus, auctor sed, tristique in, tempus sit amet, sem.", + }, + { + "username": "lbattisson5", + "email": "lbattisson5@360.cn", + "fullname": "Lynett Battisson", + "password": "oB3?1JWFM\\=S>", + "activate_user": True, + "mailing_address": "89 Vermont Pass", + "year_of_birth": 2000, + "gender": "m", + "level_of_education": "jhs", + "city": "Lyudinovo", + "goals": "Phasellus sit amet erat. Nulla tempus. Vivamus in felis eu sapien cursus vestibulum.", + }, + { + "username": "jniset6", + "email": "jniset6@virginia.edu", + "fullname": "Jacquelin Niset", + "password": "aC2/anhtj", + "activate_user": True, + "mailing_address": "83984 8th Pass", + "year_of_birth": 2003, + "gender": "f", + "level_of_education": "el", + "city": "Erie", + "goals": "Donec quis orci eget orci vehicula condimentum.", + }, + { + "username": "mdoumenc7", + "email": "mdoumenc7@chicagotribune.com", + "fullname": "Martin Doumenc", + "password": "dQ9't{0(", + "activate_user": True, + "mailing_address": "8 Scoville Plaza", + "year_of_birth": 1993, + "gender": "f", + "level_of_education": "none", + "city": "Boaco", + "goals": "Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae.", + }, + { + "username": "lchampagne8", + "email": "lchampagne8@buzzfeed.com", + "fullname": "Locke Champagne", + "password": "tW7_SYC1qUf!K'0C", + "activate_user": True, + "mailing_address": "79 Milwaukee Place", + "year_of_birth": 1996, + "gender": "f", + "level_of_education": "other", + "city": "Linjiang", + "goals": "In hac habitasse platea dictumst.", + }, + { + "username": "zczyz9", + "email": "zczyz9@gravatar.com", + "fullname": "Zolly Czyz", + "password": "jN3~/&1ZMG%", + "activate_user": True, + "mailing_address": "5 Victoria Place", + "year_of_birth": 2000, + "gender": "f", + "level_of_education": "p", + "city": "'s-Hertogenbosch", + "goals": "Suspendisse potenti.", + }, + { + "username": "jdoe1", + "email": "jdoe1@google.com", + "fullname": "John Doe", + "password": "bL2~#63pTr!Kx", + "activate_user": True, + "mailing_address": "123 Elm Street", + "year_of_birth": 1995, + "gender": "m", + "level_of_education": "b", + "city": "New York", + "goals": "Curabitur pretium tincidunt lacus.", + }, + { + "username": "msmith2", + "email": "msmith2@outlook.com", + "fullname": "Mary Smith", + "password": "gF4_%6Dm#5wJ", + "activate_user": True, + "mailing_address": "456 Oak Avenue", + "year_of_birth": 1993, + "gender": "f", + "level_of_education": "m", + "city": "Chicago", + "goals": "Aenean massa.", + }, + { + "username": "rwilliams3", + "email": "rwilliams3@aol.com", + "fullname": "Robert Williams", + "password": "kL9*~Yx2pW!", + "activate_user": False, + "mailing_address": "789 Pine Boulevard", + "year_of_birth": 1988, + "gender": "m", + "level_of_education": "el", + "city": "Los Angeles", + "goals": "Etiam ultricies nisi vel augue.", + }, + { + "username": "emurphy4", + "email": "emurphy4@yahoo.com", + "fullname": "Emily Murphy", + "password": "qN2%8Rc!xV&Z", + "activate_user": True, + "mailing_address": "321 Maple Road", + "year_of_birth": 1990, + "gender": "f", + "level_of_education": "p", + "city": "San Francisco", + "goals": "Donec pede justo, fringilla vel, aliquet nec.", + }, + { + "username": "jbrown5", + "email": "jbrown5@live.com", + "fullname": "James Brown", + "password": "hM8~P9s#tL!B", + "activate_user": False, + "mailing_address": "654 Cedar Lane", + "year_of_birth": 1992, + "gender": "m", + "level_of_education": "b", + "city": "Miami", + "goals": "Nullam quis ante.", + }, + { + "username": "adaniels6", + "email": "adaniels6@hotmail.com", + "fullname": "Alice Daniels", + "password": "vF5~#2Dk!sP", + "activate_user": True, + "mailing_address": "987 Birch Court", + "year_of_birth": 1997, + "gender": "f", + "level_of_education": "m", + "city": "Dallas", + "goals": "Vivamus elementum semper nisi.", + }, + { + "username": "mlee7", + "email": "mlee7@protonmail.com", + "fullname": "Michael Lee", + "password": "zQ7%4Yn!rT&", + "activate_user": False, + "mailing_address": "159 Redwood Drive", + "year_of_birth": 1991, + "gender": "m", + "level_of_education": "hs", + "city": "Seattle", + "goals": "Aenean vulputate eleifend tellus.", + }, + { + "username": "skelly8", + "email": "skelly8@gmail.com", + "fullname": "Sarah Kelly", + "password": "bN1*9Ts!vQ#", + "activate_user": True, + "mailing_address": "753 Cypress Street", + "year_of_birth": 1994, + "gender": "f", + "level_of_education": "b", + "city": "Austin", + "goals": "In enim justo, rhoncus ut.", + }, + { + "username": "wjohnson9", + "email": "wjohnson9@icloud.com", + "fullname": "William Johnson", + "password": "xP3%7Dl!bK&", + "activate_user": True, + "mailing_address": "246 Spruce Way", + "year_of_birth": 1989, + "gender": "m", + "level_of_education": "el", + "city": "Boston", + "goals": "Phasellus viverra nulla ut metus varius laoreet.", + }, + { + "username": "cwatson10", + "email": "cwatson10@msn.com", + "fullname": "Catherine Watson", + "password": "yJ6$2!NpQ#t", + "activate_user": False, + "mailing_address": "369 Willow Terrace", + "year_of_birth": 1998, + "gender": "f", + "level_of_education": "p", + "city": "Denver", + "goals": "Quisque rutrum.", + }, + { + "username": "jmartinez11", + "email": "jmartinez11@ymail.com", + "fullname": "Juan Martinez", + "password": "rM6@8Xc!pY#", + "activate_user": True, + "mailing_address": "123 Palm Street", + "year_of_birth": 1992, + "gender": "m", + "level_of_education": "b", + "city": "Houston", + "goals": "Aliquam erat volutpat.", + }, + { + "username": "lrodriguez12", + "email": "lrodriguez12@rediffmail.com", + "fullname": "Laura Rodriguez", + "password": "cH9*2Ml!gQ&", + "activate_user": True, + "mailing_address": "456 Willow Avenue", + "year_of_birth": 1994, + "gender": "f", + "level_of_education": "m", + "city": "Phoenix", + "goals": "Fusce vulputate eleifend sapien.", + }, + { + "username": "dthomas13", + "email": "dthomas13@gmail.com", + "fullname": "David Thomas", + "password": "wL3~7Rs!fK%", + "activate_user": False, + "mailing_address": "789 Aspen Drive", + "year_of_birth": 1987, + "gender": "m", + "level_of_education": "el", + "city": "Philadelphia", + "goals": "Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae.", + }, + { + "username": "kwhite14", + "email": "kwhite14@yahoo.com", + "fullname": "Katherine White", + "password": "pV4@1Lz!mH#", + "activate_user": True, + "mailing_address": "987 Oak Terrace", + "year_of_birth": 1999, + "gender": "f", + "level_of_education": "b", + "city": "San Diego", + "goals": "Praesent nec nisl a purus blandit viverra.", + }, + { + "username": "cgarcia15", + "email": "cgarcia15@outlook.com", + "fullname": "Carlos Garcia", + "password": "zK6#3Wx!dP&", + "activate_user": False, + "mailing_address": "654 Pine Boulevard", + "year_of_birth": 1993, + "gender": "m", + "level_of_education": "p", + "city": "San Antonio", + "goals": "Integer tincidunt.", + }, + { + "username": "bwalker16", + "email": "bwalker16@protonmail.com", + "fullname": "Barbara Walker", + "password": "jQ2@6Cm!yX%", + "activate_user": True, + "mailing_address": "321 Maple Lane", + "year_of_birth": 1995, + "gender": "f", + "level_of_education": "m", + "city": "Dallas", + "goals": "Nulla consequat massa quis enim.", + }, + { + "username": "rhall17", + "email": "rhall17@gmail.com", + "fullname": "Richard Hall", + "password": "uD5@9Vl!pT&", + "activate_user": True, + "mailing_address": "753 Cedar Court", + "year_of_birth": 1990, + "gender": "m", + "level_of_education": "b", + "city": "Jacksonville", + "goals": "Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem.", + }, + { + "username": "ashaw18", + "email": "ashaw18@live.com", + "fullname": "Alice Shaw", + "password": "tF1@8Nm!sJ#", + "activate_user": False, + "mailing_address": "246 Spruce Street", + "year_of_birth": 1997, + "gender": "f", + "level_of_education": "el", + "city": "San Jose", + "goals": "Nulla facilisi.", + }, + { + "username": "pjones19", + "email": "pjones19@msn.com", + "fullname": "Peter Jones", + "password": "vX4$7Gj!fR&", + "activate_user": True, + "mailing_address": "369 Birch Lane", + "year_of_birth": 1986, + "gender": "m", + "level_of_education": "hs", + "city": "Columbus", + "goals": "Cras ultricies mi eu turpis hendrerit fringilla.", + }, + { + "username": "mblake20", + "email": "mblake20@facebook.com", + "fullname": "Martin Blake", + "password": "rF3~xYk!8H@", + "activate_user": True, + "mailing_address": "123 Walnut St", + "year_of_birth": 1995, + "gender": "m", + "level_of_education": "b", + "city": "Cleveland", + "goals": "Etiam ut purus mattis mauris sodales aliquam.", + }, + { + "username": "rperry21", + "email": "rperry21@twitter.com", + "fullname": "Rachel Perry", + "password": "sV9~#Kd@5", + "activate_user": False, + "mailing_address": "456 Birch Road", + "year_of_birth": 1993, + "gender": "f", + "level_of_education": "m", + "city": "Raleigh", + "goals": "Curabitur sodales ligula in libero.", + }, + { + "username": "tjohnson22", + "email": "tjohnson22@gmail.com", + "fullname": "Timothy Johnson", + "password": "dK6~1Lp!9H&", + "activate_user": True, + "mailing_address": "789 Aspen Lane", + "year_of_birth": 1991, + "gender": "m", + "level_of_education": "hs", + "city": "Atlanta", + "goals": "Mauris ipsum. Nulla metus metus, ullamcorper vel, tincidunt sed.", + }, + { + "username": "skhan23", + "email": "skhan23@outlook.com", + "fullname": "Sana Khan", + "password": "pJ3!4Xv#zG", + "activate_user": False, + "mailing_address": "963 Spruce St", + "year_of_birth": 1997, + "gender": "f", + "level_of_education": "p", + "city": "Houston", + "goals": "Nunc feugiat mi a tellus consequat imperdiet.", + }, + { + "username": "lclark24", + "email": "lclark24@yahoo.com", + "fullname": "Laura Clark", + "password": "mB8@#Pk!2X", + "activate_user": True, + "mailing_address": "321 Oak St", + "year_of_birth": 1998, + "gender": "f", + "level_of_education": "jhs", + "city": "Phoenix", + "goals": "Vivamus vestibulum sagittis sapien.", + }, + { + "username": "gbaker25", + "email": "gbaker25@icloud.com", + "fullname": "George Baker", + "password": "hG4~2Yr!8L@", + "activate_user": True, + "mailing_address": "654 Pine Avenue", + "year_of_birth": 1989, + "gender": "m", + "level_of_education": "el", + "city": "San Antonio", + "goals": "Phasellus viverra nulla ut metus varius laoreet.", + }, + { + "username": "ajames26", + "email": "ajames26@msn.com", + "fullname": "Angela James", + "password": "nX7@1Bw!3V#", + "activate_user": True, + "mailing_address": "987 Birch Court", + "year_of_birth": 1995, + "gender": "f", + "level_of_education": "b", + "city": "San Diego", + "goals": "Nulla facilisi.", + }, + { + "username": "jmiller27", + "email": "jmiller27@protonmail.com", + "fullname": "John Miller", + "password": "tK5@8Nz!rG#", + "activate_user": False, + "mailing_address": "753 Maple Street", + "year_of_birth": 1993, + "gender": "m", + "level_of_education": "hs", + "city": "Las Vegas", + "goals": "Etiam sollicitudin, ipsum eu pulvinar rutrum.", + }, + { + "username": "zsmith28", + "email": "zsmith28@aol.com", + "fullname": "Zachary Smith", + "password": "wM9!3Lc@7K&", + "activate_user": True, + "mailing_address": "456 Cedar Lane", + "year_of_birth": 1990, + "gender": "m", + "level_of_education": "el", + "city": "Orlando", + "goals": "Nullam quis ante.", + }, + { + "username": "pphillips29", + "email": "pphillips29@ymail.com", + "fullname": "Pamela Phillips", + "password": "cT1@6Yh!8J#", + "activate_user": True, + "mailing_address": "789 Walnut Ave", + "year_of_birth": 1994, + "gender": "f", + "level_of_education": "p", + "city": "Dallas", + "goals": "Praesent nec nisl a purus blandit viverra.", + }, + { + "username": "cmorris30", + "email": "cmorris30@rediffmail.com", + "fullname": "Charles Morris", + "password": "fG5~2Ux@9J&", + "activate_user": True, + "mailing_address": "963 Oak Terrace", + "year_of_birth": 1992, + "gender": "m", + "level_of_education": "b", + "city": "Seattle", + "goals": "Integer tincidunt.", + }, + { + "username": "dwatson31", + "email": "dwatson31@live.com", + "fullname": "Daniel Watson", + "password": "zN3!5Pq@7L#", + "activate_user": False, + "mailing_address": "159 Spruce Lane", + "year_of_birth": 1996, + "gender": "m", + "level_of_education": "el", + "city": "Boston", + "goals": "Aliquam erat volutpat.", + }, + { + "username": "ljones32", + "email": "ljones32@buzzfeed.com", + "fullname": "Lydia Jones", + "password": "gK8!3Tf@2M&", + "activate_user": True, + "mailing_address": "753 Birch Road", + "year_of_birth": 1991, + "gender": "f", + "level_of_education": "b", + "city": "Austin", + "goals": "Phasellus viverra nulla ut metus varius laoreet.", + }, + { + "username": "dsanchez33", + "email": "dsanchez33@gravatar.com", + "fullname": "David Sanchez", + "password": "bL5!8Wx@3V#", + "activate_user": True, + "mailing_address": "246 Cedar Court", + "year_of_birth": 1995, + "gender": "m", + "level_of_education": "m", + "city": "Columbus", + "goals": "Praesent nec nisl a purus blandit viverra.", + }, + { + "username": "jgarcia34", + "email": "jgarcia34@yahoo.com", + "fullname": "Jose Garcia", + "password": "hM6@3Qr!5K&", + "activate_user": True, + "mailing_address": "963 Maple Drive", + "year_of_birth": 1989, + "gender": "m", + "level_of_education": "hs", + "city": "Jacksonville", + "goals": "Curabitur sodales ligula in libero.", + }, + { + "username": "yhernandez35", + "email": "yhernandez35@protonmail.com", + "fullname": "Yolanda Hernandez", + "password": "mT4!2Zj@7V#", + "activate_user": True, + "mailing_address": "321 Birch Street", + "year_of_birth": 1994, + "gender": "f", + "level_of_education": "p", + "city": "Los Angeles", + "goals": "Curabitur sodales ligula in libero.", + }, + { + "username": "jroberts30", + "email": "jroberts30@gmail.com", + "fullname": "Jessica Roberts", + "password": "sL9#2Ty!xJ@", + "activate_user": True, + "mailing_address": "123 Main Street", + "year_of_birth": 1994, + "gender": "f", + "level_of_education": "m", + "city": "Nashville", + "goals": "Integer ac leo.", + }, + { + "username": "mmorris31", + "email": "mmorris31@outlook.com", + "fullname": "Matthew Morris", + "password": "vD6$3Ym!uP%", + "activate_user": True, + "mailing_address": "456 Park Avenue", + "year_of_birth": 1992, + "gender": "m", + "level_of_education": "b", + "city": "Salt Lake City", + "goals": "Suspendisse potenti.", + }, + { + "username": "kgreen32", + "email": "kgreen32@yahoo.com", + "fullname": "Karen Green", + "password": "rX5@8Nc!gQ&", + "activate_user": False, + "mailing_address": "789 Oak Drive", + "year_of_birth": 1991, + "gender": "f", + "level_of_education": "p", + "city": "Charleston", + "goals": "Aenean vulputate eleifend tellus.", + }, + ] +) diff --git a/eox_core/api/v1/tests/integration/test_views.py b/eox_core/api/v1/tests/integration/test_views.py index 905a19599..5a0043856 100644 --- a/eox_core/api/v1/tests/integration/test_views.py +++ b/eox_core/api/v1/tests/integration/test_views.py @@ -12,155 +12,9 @@ from django.urls import reverse from rest_framework import status -settings = ds.INTEGRATION_TEST_SETTINGS +from eox_core.api.v1.tests.integration.data.fake_users import FAKE_USER_DATA -FAKE_USER_DATA = iter( - [ - { - "username": "athickpenny0", - "email": "athickpenny0@indiegogo.com", - "fullname": "Antoni Thickpenny", - "password": "jD3_u)67VfHce", - "activate_user": True, - "mailing_address": "70736 Haas Parkway", - "year_of_birth": 1996, - "gender": "f", - "level_of_education": "p", - "city": "Solikamsk", - "goals": "Maecenas leo odio, condimentum id", - }, - { - "username": "smenchenton1", - "email": "smenchenton1@networksolutions.com", - "fullname": "Sonia Menchenton", - "password": "hO9\\Pni)", - "activate_user": True, - "mailing_address": "7543 Eagle Crest Terrace", - "year_of_birth": 1998, - "gender": "m", - "level_of_education": "m", - "city": "Diourbel", - "goals": "Sed sagittis.", - }, - { - "username": "arealff2", - "email": "arealff2@phpbb.com", - "fullname": "Alexis Realff", - "password": 'zY2(yq!(>4"_', - "activate_user": True, - "mailing_address": "0 Grim Drive", - "year_of_birth": 2005, - "gender": "f", - "level_of_education": "b", - "city": "Gongyi", - "goals": "Proin interdum mauris non ligula pellentesque ultrices.", - }, - { - "username": "ddilon3", - "email": "ddilon3@geocities.com", - "fullname": "Dotty Dilon", - "password": 'mV9"3zRdRr#bTP', - "activate_user": True, - "mailing_address": "6859 Lerdahl Road", - "year_of_birth": 2002, - "gender": "m", - "level_of_education": "a", - "city": "La Curva", - "goals": "Morbi sem mauris, laoreet ut, rhoncus aliquet, pulvinar sed, nisl.", - }, - { - "username": "lties4", - "email": "lties4@addthis.com", - "fullname": "Loreen Ties", - "password": 'iU6@R"`/t3>/DT', - "activate_user": True, - "mailing_address": "64 Clemons Terrace", - "year_of_birth": 1994, - "gender": "f", - "level_of_education": "hs", - "city": "Xianyang", - "goals": "In est risus, auctor sed, tristique in, tempus sit amet, sem.", - }, - { - "username": "lbattisson5", - "email": "lbattisson5@360.cn", - "fullname": "Lynett Battisson", - "password": "oB3?1JWFM\\=S>", - "activate_user": True, - "mailing_address": "89 Vermont Pass", - "year_of_birth": 2000, - "gender": "m", - "level_of_education": "jhs", - "city": "Lyudinovo", - "goals": "Phasellus sit amet erat. Nulla tempus. Vivamus in felis eu sapien cursus vestibulum.", - }, - { - "username": "jniset6", - "email": "jniset6@virginia.edu", - "fullname": "Jacquelin Niset", - "password": "aC2/anhtj", - "activate_user": True, - "mailing_address": "83984 8th Pass", - "year_of_birth": 2003, - "gender": "f", - "level_of_education": "el", - "city": "Erie", - "goals": "Donec quis orci eget orci vehicula condimentum.", - }, - { - "username": "mdoumenc7", - "email": "mdoumenc7@chicagotribune.com", - "fullname": "Martin Doumenc", - "password": "dQ9't{0(", - "activate_user": True, - "mailing_address": "8 Scoville Plaza", - "year_of_birth": 1993, - "gender": "f", - "level_of_education": "none", - "city": "Boaco", - "goals": "Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae.", - }, - { - "username": "lchampagne8", - "email": "lchampagne8@buzzfeed.com", - "fullname": "Locke Champagne", - "password": "tW7_SYC1qUf!K'0C", - "activate_user": True, - "mailing_address": "79 Milwaukee Place", - "year_of_birth": 1996, - "gender": "f", - "level_of_education": "other", - "city": "Linjiang", - "goals": "In hac habitasse platea dictumst.", - }, - { - "username": "zczyz9", - "email": "zczyz9@gravatar.com", - "fullname": "Zolly Czyz", - "password": "jN3~/&1ZMG%", - "activate_user": True, - "mailing_address": "5 Victoria Place", - "year_of_birth": 2000, - "gender": "f", - "level_of_education": "p", - "city": "'s-Hertogenbosch", - "goals": "Suspendisse potenti.", - }, - { - "username": "athickpenny0", - "email": "athickpenny0@indiegogo.com", - "fullname": "Antoni Thickpenny", - "password": "jD3_u)67VfHce", - "activate_user": False, - "mailing_address": "70736 Haas Parkway", - "year_of_birth": 1996, - "gender": "f", - "level_of_education": "m", - "city": "Solikamsk", - "goals": "Maecenas leo odio, condimentum id, luctus nec, molestie sed, justo.", - }, - ] -) +settings = ds.INTEGRATION_TEST_SETTINGS class BaseAPIIntegrationTest(TestCase):