Skip to content
This repository has been archived by the owner on Jun 21, 2019. It is now read-only.

Commit

Permalink
big ugly initial commit
Browse files Browse the repository at this point in the history
rref #5367
rref #5366
ref zetaops/zengine#66
ref zetaops/zengine#65
  • Loading branch information
evrenesat committed Jun 21, 2016
1 parent 8e1bbad commit a5e71a5
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
12 changes: 6 additions & 6 deletions tests/test_terfisi_gelen_personel.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down Expand Up @@ -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"}
Expand All @@ -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

Expand Down Expand Up @@ -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']

Expand All @@ -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!"
2 changes: 1 addition & 1 deletion ulakbus/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 *
Expand Down
2 changes: 1 addition & 1 deletion ulakbus/models/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)


Expand Down
2 changes: 1 addition & 1 deletion ulakbus/views/ders/ders.py
Original file line number Diff line number Diff line change
Expand Up @@ -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', [])
Expand Down
2 changes: 1 addition & 1 deletion ulakbus/views/ogrenci/kayit_silme.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down
2 changes: 1 addition & 1 deletion ulakbus/views/ogrenci/ogrenci.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down

0 comments on commit a5e71a5

Please sign in to comment.