🐛(backend) fix flaky test with search contact
Sometimes emails generated by faker in data field match search. So it's necessary to create contacts with empty data field to search contacts by full_name in tests.
This commit is contained in:
@@ -18,6 +18,7 @@ and this project adheres to
|
|||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
|
- 🐛(backend) fix flaky test with search contact #605
|
||||||
- 🐛(backend) fix flaky test with team access #646
|
- 🐛(backend) fix flaky test with team access #646
|
||||||
- 🧑💻(dimail) remove 'NoneType: None' log in debug mode
|
- 🧑💻(dimail) remove 'NoneType: None' log in debug mode
|
||||||
- 🐛(frontend) fix flaky e2e test #636
|
- 🐛(frontend) fix flaky e2e test #636
|
||||||
|
|||||||
@@ -25,8 +25,6 @@ from core.api import permissions
|
|||||||
from core.api.client import serializers
|
from core.api.client import serializers
|
||||||
from core.utils.raw_sql import gen_sql_filter_json_array
|
from core.utils.raw_sql import gen_sql_filter_json_array
|
||||||
|
|
||||||
SIMILARITY_THRESHOLD = 0.04
|
|
||||||
|
|
||||||
|
|
||||||
class NestedGenericViewSet(viewsets.GenericViewSet):
|
class NestedGenericViewSet(viewsets.GenericViewSet):
|
||||||
"""
|
"""
|
||||||
|
|||||||
@@ -102,10 +102,10 @@ def test_api_contacts_list_authenticated_by_full_name():
|
|||||||
"""
|
"""
|
||||||
user = factories.UserFactory(name="Prudence Crandall")
|
user = factories.UserFactory(name="Prudence Crandall")
|
||||||
|
|
||||||
dave = factories.BaseContactFactory(full_name="David Bowman")
|
dave = factories.BaseContactFactory(full_name="David Bowman", data={})
|
||||||
nicole = factories.BaseContactFactory(full_name="Nicole Foole")
|
nicole = factories.BaseContactFactory(full_name="Nicole Foole", data={})
|
||||||
frank = factories.BaseContactFactory(full_name="Frank Poole")
|
frank = factories.BaseContactFactory(full_name="Frank Poole", data={})
|
||||||
factories.BaseContactFactory(full_name="Heywood Floyd")
|
factories.BaseContactFactory(full_name="Heywood Floyd", data={})
|
||||||
|
|
||||||
# Full query should work
|
# Full query should work
|
||||||
client = APIClient()
|
client = APIClient()
|
||||||
|
|||||||
Reference in New Issue
Block a user