def test_find_user_email_not_empty_return_true(self, mock_memo_users): result = find_user("*****@*****.**", "katrze89") self.assertTrue(result)
def test_find_user_email_not_empty_return_false(self, mock_memo_users): mock_memo_users.find_one.return_value = None result = find_user("*****@*****.**", "katrze89") self.assertFalse(result)
def test_find_user_email_not_empty_called_with(self, mock_memo_users): find_user("*****@*****.**", "katrze89") mock_memo_users.find_one.assert_called_with( {"email": "*****@*****.**"})
def test_find_user_email_empty_return_false(self, mock_memo_users): mock_memo_users.find_one.return_value = None result = find_user("Empty", "katrze89") self.assertFalse(result)
def test_find_user_email_empty_return_true(self, mock_memo_users): result = find_user("Empty", "katrze89") self.assertTrue(result)
def test_find_user_email_empty_called_with(self, mock_memo_users): find_user("Empty", "katrze89") mock_memo_users.find_one.assert_called_with({"login": "******"})
def test_find_user_email_empty_called_once(self, mock_memo_users): find_user("Empty", "katrze89") mock_memo_users.find_one.assert_called_once()