def test_invalid_request_1(self):
     """ Missing roles """
     request_dict = {
         'salary': 60000,
         'employment_type': EmploymentType.query.first().id,
         'location': Location.query.first().id,
         'years_with_current_employer': 1,
         'years_experience': 1,
         'roles': [],
         'techs': [],
         'perks': [],
         'education': Education.query.first().id,
         'email': '*****@*****.**'
     }
     assert len(SubmissionRequestSchema().validate(request_dict)) > 0
 def test_invalid_request_4(self):
     """ email on blacklisted domain """
     request_dict = {
         'salary': 60000,
         'employment_type': EmploymentType.query.first().id,
         'location': Location.query.first().id,
         'years_with_current_employer': 1,
         'years_experience': 1,
         'roles': [
             {
                 'id': Role.query.first().id
             }
         ],
         'techs': [],
         'perks': [],
         'education': Education.query.first().id,
         'email': '*****@*****.**'
     }
     assert len(SubmissionRequestSchema().validate(request_dict)) > 0
 def test_invalid_request_3(self):
     """ email with '+' in it """
     request_dict = {
         'salary': 60000,
         'employment_type': EmploymentType.query.first().id,
         'location': Location.query.first().id,
         'years_with_current_employer': 1,
         'years_experience': 1,
         'roles': [
             {
                 'id': Role.query.first().id
             }
         ],
         'techs': [],
         'perks': [],
         'education': Education.query.first().id,
         'email': '*****@*****.**'
     }
     assert len(SubmissionRequestSchema().validate(request_dict)) > 0