Skip to content

Commit

Permalink
Added "Role" class to db.init()
Browse files Browse the repository at this point in the history
  • Loading branch information
eoyilmaz committed Dec 11, 2014
1 parent 4918808 commit c11bbdf
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
11 changes: 6 additions & 5 deletions stalker/db/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,13 @@ def init():

# register all Actions available for all SOM classes
class_names = [
'Asset', 'TimeLog', 'Client', 'Daily', 'Department', 'Entity',
'FilenameTemplate', 'Group', 'ImageFormat', 'Link', 'Message', 'Note',
'Page', 'Permission', 'Project', 'Repository', 'Review', 'Scene',
'Asset', 'Client', 'Daily', 'Department', 'Entity', 'FilenameTemplate',
'Group', 'ImageFormat', 'Link', 'Message', 'Note', 'Page',
'Permission', 'Project', 'Repository', 'Review', 'Role', 'Scene',
'Sequence', 'Shot', 'SimpleEntity', 'Status', 'StatusList',
'Structure', 'Studio', 'Tag', 'Task', 'Ticket', 'TicketLog', 'Type',
'User', 'Vacation', 'Version']
'Structure', 'Studio', 'Tag', 'Task', 'Ticket', 'TicketLog', 'TimeLog',
'Type', 'User', 'Vacation', 'Version'
]

for class_name in class_names:
_temp = __import__(
Expand Down
10 changes: 5 additions & 5 deletions tests/db/test_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,10 +292,10 @@ def test_permissions_created_for_all_the_classes(self):
class_names = [
'Asset', 'Client', 'Group', 'Permission', 'User', 'Department',
'SimpleEntity', 'Entity', 'ImageFormat', 'Link', 'Message', 'Note',
'Page', 'Project', 'Repository', 'Review', 'Scene', 'Sequence',
'Shot', 'Status', 'StatusList', 'Structure', 'Studio', 'Tag',
'TimeLog', 'Task', 'FilenameTemplate', 'Ticket', 'TicketLog',
'Type', 'Vacation', 'Version', 'Daily'
'Page', 'Project', 'Repository', 'Review', 'Role', 'Scene',
'Sequence', 'Shot', 'Status', 'StatusList', 'Structure', 'Studio',
'Tag', 'TimeLog', 'Task', 'FilenameTemplate', 'Ticket',
'TicketLog', 'Type', 'Vacation', 'Version', 'Daily'
]

permission_db = Permission.query.all()
Expand Down Expand Up @@ -337,7 +337,7 @@ def test_permissions_not_created_over_and_over_again(self):

# and we still have correct amount of Permissions
permissions = Permission.query.all()
self.assertEqual(len(permissions), 330)
self.assertEqual(len(permissions), 340)

# clean the test
shutil.rmtree(temp_db_path)
Expand Down

0 comments on commit c11bbdf

Please sign in to comment.