def on_connect(self):
     uri = self.uriEdit.text()
     login = self.loginEdit.text()
     password = self.passwordEdit.text()
     self.connection = DataBaseConnection(uri, login, password)
     self.loginSuccesful.emit()
     self.close()
 def setUpClass(cls):
     DataBaseConnection(**TestConfig.NEO4J_DATA)
 def setUpClass(cls):
     DataBaseConnection(**TestConfig.NEO4J_DATA)
     TextProcessor().clear_db()
     cls.app = QApplication(sys.argv)
Beispiel #4
0
 def test_connect(self):
     """
         Проверка подключения. Если не подключается, будет Exception
     """
     connection = DataBaseConnection(**TestConfig.NEO4J_DATA)
     connection.connect(**TestConfig.NEO4J_DATA)
 def setUpClass(cls):
     DataBaseConnection(**TestConfig.NEO4J_DATA)
     cls.processor = TextProcessor()
     cls.processor.clear_db()
import setup_

from api import TextProcessor
from api.database import DataBaseConnection
from api.algorithm import DictionaryAlgorithm
from ui.widgets import AlgorithmResults
from PyQt5.QtWidgets import QApplication
from tests.config import Config
import sys

if __name__ == "__main__":
    db = DataBaseConnection(**Config.NEO4J_DATA)
    proc = TextProcessor()
    alg = DictionaryAlgorithm()
    app = QApplication(sys.argv)
    widget = AlgorithmResults(alg, proc)
    widget.show()

    sys.exit(app.exec_())
Beispiel #7
0
 def setUpClass(cls):
     DataBaseConnection(**TestConfig.NEO4J_DATA)
     [node.delete() for node in TextNode.nodes.all()]