Skip to content

Commit

Permalink
Updated views and tests
Browse files Browse the repository at this point in the history
  • Loading branch information
georgelwalker committed Apr 28, 2017
1 parent 87d70e6 commit cedde0d
Show file tree
Hide file tree
Showing 33 changed files with 3,681 additions and 1,752 deletions.
5 changes: 5 additions & 0 deletions TFRS.pyproj
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@
<Compile Include="server\fakedata.py" />
<Compile Include="server\migrations\0001_initial.py" />
<Compile Include="server\migrations\0002_auto_20170214_1526.py" />
<Compile Include="server\migrations\0003_auto_20170421_1327.py" />
<Compile Include="server\migrations\0004_auto_20170427_1726.py" />
<Compile Include="server\migrations\__init__.py" />
<Compile Include="server\models\Attachment.py" />
<Compile Include="server\models\AttachmentViewModel.py" />
Expand All @@ -59,6 +61,7 @@
<Compile Include="server\models\Notification.py" />
<Compile Include="server\models\NotificationEvent.py" />
<Compile Include="server\models\NotificationViewModel.py" />
<Compile Include="server\models\Offer.py" />
<Compile Include="server\models\Permission.py" />
<Compile Include="server\models\PermissionViewModel.py" />
<Compile Include="server\models\Role.py" />
Expand All @@ -74,6 +77,8 @@
<Compile Include="server\models\UserViewModel.py" />
<Compile Include="server\models\__init__.py" />
<Compile Include="server\serializers.py" />
<Compile Include="server\test_api_complex.py" />
<Compile Include="server\test_api_custom.py" />
<Compile Include="server\test_api_simple.py" />
<Compile Include="server\views.py" />
<Compile Include="server\views_custom.py" />
Expand Down
1 change: 1 addition & 0 deletions obj/Debug/CoreCompileInputs.cache
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0705011114a8a8421dcf9aa7491bf0250495cbf7
4 changes: 2 additions & 2 deletions server/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
from .models.Attachment import Attachment
from .models.AttachmentViewModel import AttachmentViewModel
from .models.Audit import Audit
from .models.CompliancePeriod import CompliancePeriod
from .models.Contact import Contact
from .models.CreditTrade import CreditTrade
from .models.CreditTradeLogEntry import CreditTradeLogEntry
Expand All @@ -40,6 +39,7 @@
from .models.Notification import Notification
from .models.NotificationEvent import NotificationEvent
from .models.NotificationViewModel import NotificationViewModel
from .models.Offer import Offer
from .models.Permission import Permission
from .models.PermissionViewModel import PermissionViewModel
from .models.Role import Role
Expand All @@ -59,7 +59,6 @@
admin.site.register(Attachment)
admin.site.register(AttachmentViewModel)
admin.site.register(Audit)
admin.site.register(CompliancePeriod)
admin.site.register(Contact)
admin.site.register(CreditTrade)
admin.site.register(CreditTradeLogEntry)
Expand All @@ -76,6 +75,7 @@
admin.site.register(Notification)
admin.site.register(NotificationEvent)
admin.site.register(NotificationViewModel)
admin.site.register(Offer)
admin.site.register(Permission)
admin.site.register(PermissionViewModel)
admin.site.register(Role)
Expand Down
32 changes: 19 additions & 13 deletions server/fakedata.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,19 +85,6 @@ def AuditTestDataUpdate():
}


def CompliancePeriodTestDataCreate():
return {
'periodName':'Initial',
'isActive':True,
}

def CompliancePeriodTestDataUpdate():
return {
'periodName':'Changed',
'isActive':False,
}


def ContactTestDataCreate():
return {
'givenName':'Initial',
Expand Down Expand Up @@ -362,6 +349,25 @@ def NotificationViewModelTestDataUpdate():
}


def OfferTestDataCreate():
return {
'status':'Initial',
'buyOrSell':'Initial',
'numberOfCredits':1,
'numberOfViews':1,
'note':'Initial',
}

def OfferTestDataUpdate():
return {
'status':'Changed',
'buyOrSell':'Changed',
'numberOfCredits':0,
'numberOfViews':0,
'note':'Changed',
}


def PermissionTestDataCreate():
return {
'code':'Initial',
Expand Down
Loading

0 comments on commit cedde0d

Please sign in to comment.