Skip to content
Snippets Groups Projects
Commit 0be1c044 authored by Luisa Arrabito's avatar Luisa Arrabito
Browse files

remove test files

parent 8dd12c66
No related branches found
Tags 2.0.13
No related merge requests found
export X509_CERT_DIR=/Users/arrabito/PycharmProjects/etc/grid-security/certificates
export X509_VOMS_DIR=${CONDA_PREFIX}/etc/grid-security/vomsdir
export X509_VOMSES=${CONDA_PREFIX}/etc/grid-security/vomses
export OPENSSL_CONF=/tmp
export SSL_CERT_DIR=/Users/arrabito/PycharmProjects/etc/grid-security/certificates
\ No newline at end of file
"""
ProvenanceDB test
December 8th 2021 - P. Maeght
"""
import unittest
import sys
from unittest.mock import patch
from CTADIRAC.DataManagementSystem.DB.ProvenanceDB import ProvenanceDB
class TestProvDB(unittest.TestCase):
"""
test class for ProvDB
"""
def test_dictToObject(self):
"""
Test _dictToObject
"""
def mock_ProvenanceDB__init__(self):
# No init need for _dictToObject
pass
with patch.object(ProvenanceDB, "__init__", mock_ProvenanceDB__init__):
# New ProvenanceDB
pdb = ProvenanceDB()
# Dummy fromDict dict
item = {
"field1": "OK",
"field2": "OK",
}
# Table Object
class Table:
field1 = "NOK"
field2 = "NOK"
# ret = pdb._dictToObject(Table, item)
pdb._dictToObject(Table, item)
# Table updated
assert Table.field2 == b"OK"
if __name__ == '__main__':
unittest.main()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment