Ejemplo n.º 1
0
    def teardown(self):
        QtTest.QTest.mouseClick(self.window.logoutButton, QtCore.Qt.LeftButton)
        QtWidgets.QApplication.processEvents()
        with self.app.app_context():
            email = [
                ("*****@*****.**", "something"),
                ("*****@*****.**", "other"),
                ("*****@*****.**", "anton"),
                ("*****@*****.**", "berta"),
            ]
            for em, username in email:
                mscolab_delete_all_projects(self.app, self.MSCOLAB_URL_TEST,
                                            em, "something", username)
                mscolab_delete_user(self.app, self.MSCOLAB_URL_TEST, em,
                                    "something")

        # to disconnect connections, and clear token
        self.window.disconnect_handler()
        QtWidgets.QApplication.processEvents()
        self.window.close()
        QtWidgets.QApplication.processEvents()
        self.application.quit()
        QtWidgets.QApplication.processEvents()
        with fs.open_fs(mscolab_settings.MSCOLAB_DATA_DIR) as mss_dir:
            if mss_dir.exists('local_mscolab_data'):
                mss_dir.removetree('local_mscolab_data')
Ejemplo n.º 2
0
 def teardown(self):
     with self.app.app_context():
         mscolab_delete_all_projects(self.app, self.url, 'a1a@a1a', 'a1a',
                                     'a1a')
         mscolab_delete_user(self.app, self.url, 'a1a@a1a', 'a1a')
     if self.window.version_window:
         self.window.version_window.close()
     if self.window.conn:
         self.window.conn.disconnect()
     self.application.quit()
     QtWidgets.QApplication.processEvents()
     self.process.terminate()
Ejemplo n.º 3
0
 def teardown(self):
     with self.app.app_context():
         mscolab_delete_all_projects(self.app, MSCOLAB_URL_TEST, '*****@*****.**', 'abcdef', 'alpha')
         mscolab_delete_all_projects(self.app, MSCOLAB_URL_TEST, '*****@*****.**', 'user', 'user')
         for em, pw in [('*****@*****.**', 'abcdef'),
                        ('*****@*****.**', 'user2'),
                        ('*****@*****.**', 'abcdef'),
                        ('*****@*****.**', 'other'),
                        ('*****@*****.**', 'user')
                        ]:
             server.register_user(em, pw, 'test')
             mscolab_delete_user(self.app, MSCOLAB_URL_TEST, em, pw)
         server.db.session.commit()
Ejemplo n.º 4
0
 def teardown(self):
     with self.app.app_context():
         mscolab_delete_all_projects(self.app, self.url, self.emailid,
                                     'abcdef', 'alpha')
         mscolab_delete_user(self.app, self.url, self.emailid, 'abcdef')
     with fs.open_fs(mscolab_settings.MSCOLAB_DATA_DIR) as mss_dir:
         if mss_dir.exists('local_mscolab_data'):
             mss_dir.removetree('local_mscolab_data')
         assert mss_dir.exists('local_mscolab_data') is False
     if self.window.version_window:
         self.window.version_window.close()
     if self.window.conn:
         self.window.conn.disconnect()
     self.application.quit()
     QtWidgets.QApplication.processEvents()
     self.process.terminate()