Skip to content
Permalink
Browse files

fixed tests

  • Loading branch information...
nad2000 committed Oct 9, 2019
1 parent d800d03 commit 99e925d96270b01bafc2233f5416bb2452d835c0
Showing with 4 additions and 2 deletions.
  1. +1 −1 orcid_hub/models.py
  2. +2 −1 orcid_hub/utils.py
  3. +1 −0 tests/test_views.py
@@ -3,7 +3,6 @@

import copy
import csv
import json
import jsonschema
import os
import random
@@ -23,6 +22,7 @@
import chardet
import validators
import yaml
from flask import json
from flask_login import UserMixin, current_user
from peewee import JOIN, BlobField, SqliteDatabase
from peewee import BooleanField as BooleanField_
@@ -2574,7 +2574,8 @@ def activate_all_records(task):
status = "The record was activated at " + datetime.now().isoformat(timespec="seconds")
count = task.record_model.update(is_active=True, status=status).where(
task.record_model.task == task,
task.record_model.is_active == False).execute() # noqa: E712
(task.record_model.is_active.is_null() |
(task.record_model.is_active == False))).execute() # noqa: E712
task.status = "ACTIVE"
task.save()
enqueue_task_records(task)
@@ -4503,6 +4503,7 @@ def test_research_resources(client, mocker):
for export_type in ["csv", "tsv", "json", "yaml"]:
resp = client.get(f"/admin/resourcerecord/export/{export_type}/?task_id={task.id}")
file_name = f"resources_reimport.{export_type}"

resp = client.post(
"/load/task/RESOURCE",
data={"file_": (BytesIO(resp.data), file_name)},

0 comments on commit 99e925d

Please sign in to comment.
You can’t perform that action at this time.