diff --git a/tests/test_terfisi_gelen_personel.py b/tests/test_terfisi_gelen_personel.py index 32434c01..ab9a744d 100644 --- a/tests/test_terfisi_gelen_personel.py +++ b/tests/test_terfisi_gelen_personel.py @@ -10,7 +10,7 @@ from ulakbus.models import User, Personel from zengine.lib.test_utils import BaseTestCase -from zengine.notifications.model import NotificationMessage +from zengine.messaging.model import Message import time @@ -52,7 +52,7 @@ def test_terfisi_gelen_personel(self): self.client.post(cmd="red_aciklamasi_yaz", form={'Personel': resp.json['forms']['model']['Personel'], 'duzenle': 1}) - NotificationMessage.objects.filter().delete() + Message.objects.filter().delete() resp = self.client.post( wf='terfisi_gelen_personel_listesi', form={'devam': 1, 'red_aciklama': "Reddedildi"} @@ -68,7 +68,7 @@ def test_terfisi_gelen_personel(self): token, user = self.get_user_token('personel_isleri_1') resp = self.client.post(token=token) ter_gel_id_per = resp.json['forms']['model']['Personel'] - NotificationMessage.objects.filter().delete() + Message.objects.filter().delete() assert len(ter_gel_id_per) == 3 @@ -120,7 +120,7 @@ def personel_terfi_onay(self): token, user = self.get_user_token('genel_sekreter_1') resp = self.client.post(token=token) assert len(resp.json['forms']['model']['Personel']) == 3 - NotificationMessage.objects.filter().delete() + Message.objects.filter().delete() ter_gel_id_per = resp.json['forms']['model']['Personel'] @@ -133,10 +133,10 @@ def personel_terfi_onay(self): time.sleep(1) usr = User.objects.get(username='personel_isleri_1') - msg = NotificationMessage.objects.filter(receiver=usr)[0] + msg = Message.objects.filter(receiver=usr)[0] token = msg.url.split('/')[-1] self.prepare_client('/terfisi_gelen_personel_listesi', user=usr, token=token) resp = self.client.post() - NotificationMessage.objects.filter().delete() + Message.objects.filter().delete() assert resp.json['msgbox']['title'] == "Terfi İşlemleri Onay Belgesi!" diff --git a/ulakbus/models/__init__.py b/ulakbus/models/__init__.py index 4185fadd..e96691ed 100644 --- a/ulakbus/models/__init__.py +++ b/ulakbus/models/__init__.py @@ -6,7 +6,7 @@ # # This file is licensed under the GNU General Public License v3 # (GPLv3). See LICENSE.txt for details. -from zengine.notifications.model import NotificationMessage +from zengine.messaging.model import Message from .personel import * from .auth import * from .ogrenci import * diff --git a/ulakbus/models/auth.py b/ulakbus/models/auth.py index fcfb10d3..8954cdda 100644 --- a/ulakbus/models/auth.py +++ b/ulakbus/models/auth.py @@ -104,7 +104,7 @@ def get_role(self, role_id): return self.role_set.node_dict[role_id] def send_message(self, title, message, sender=None): - from zengine.notifications import Notify + from zengine.messaging import Notify Notify(self.key).set_message(title, message, typ=Notify.Message, sender=sender) diff --git a/ulakbus/views/ders/ders.py b/ulakbus/views/ders/ders.py index e3dbb717..689e0469 100644 --- a/ulakbus/views/ders/ders.py +++ b/ulakbus/views/ders/ders.py @@ -386,7 +386,7 @@ def bilgi_ver(self): """ - from zengine.notifications import Notify + from zengine.messaging import Notify just_created = self.current.task_data.get('just_created', []) just_deleted = self.current.task_data.get('just_deleted', []) diff --git a/ulakbus/views/ogrenci/kayit_silme.py b/ulakbus/views/ogrenci/kayit_silme.py index ec43ccf1..91b03456 100644 --- a/ulakbus/views/ogrenci/kayit_silme.py +++ b/ulakbus/views/ogrenci/kayit_silme.py @@ -8,7 +8,7 @@ from ulakbus.models import OgrenciProgram, Ogrenci, Role, User, AbstractRole from zengine.forms import fields -from zengine.notifications import Notify +from zengine.messaging import Notify from zengine.views.crud import CrudView ABSTRACT_ROLE_LIST = [ diff --git a/ulakbus/views/ogrenci/ogrenci.py b/ulakbus/views/ogrenci/ogrenci.py index 6eb958cf..e94aded3 100644 --- a/ulakbus/views/ogrenci/ogrenci.py +++ b/ulakbus/views/ogrenci/ogrenci.py @@ -29,7 +29,7 @@ from ulakbus.views.ders.ders import prepare_choices_for_model from zengine import forms from zengine.forms import fields -from zengine.notifications import Notify +from zengine.messaging import Notify from zengine.views.crud import CrudView