Skip to content

Commit

Permalink
change log test, to use registry.update instead of running the search…
Browse files Browse the repository at this point in the history
…_index command

update travis to run the test command without removing the log test
  • Loading branch information
helllllllder committed Aug 10, 2021
1 parent a77634c commit 61797c1
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions bothub/api/v2/tests/test_logs.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import json
import time

from django.core.management import call_command
from django.test import RequestFactory
from django.test import tag
from django.test import TestCase
from django_elasticsearch_dsl.registries import registry
from rest_framework import status

from bothub.api.v2.nlp.views import RepositoryNLPLogsViewSet
Expand Down Expand Up @@ -172,8 +171,7 @@ def setUp(self):
is_default=False,
repository_nlp_log=nlp_log,
)
call_command("search_index", "--rebuild", "-f")
time.sleep(10)
registry.update(nlp_log)

def request(self, data, token=None):
authorization_header = (
Expand Down

0 comments on commit 61797c1

Please sign in to comment.