-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathfixtures.py
65 lines (62 loc) · 2.08 KB
/
fixtures.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# -*- coding: utf-8 -*-
# Copyright (C) 2012-2014 Mag. Christian Tanzer All rights reserved
# Glasauergasse 32, A--1130 Wien, Austria. [email protected]
# #*** <License> ************************************************************#
# This module is part of the program FFG.
#
# This module is licensed under the terms of the BSD 3-Clause License
# <http://www.c-tanzer.at/license/bsd_3c.html>.
# #*** </License> ***********************************************************#
#
#++
# Name
# fixtures
#
# Purpose
# Create standard objects for new scope
#
# Revision Dates
# 17-Dec-2012 (RS) Creation, move old fixtures.py to _FFW
# 27-May-2013 (CT) Remove trivial `password` values
# 28-Apr-2014 (CT) Add account `[email protected]` and group `FFW-admin`
# 01-Sep-2014 (MB) Add account '[email protected]'
# 01-Sep-2014 (MB) Move to FFG
# ««revision-date»»···
#--
import _CNDB._OMP.fixtures
from _CNDB import CNDB
import _CNDB._OMP
def create (scope) :
CNDB.OMP.fixtures.create (scope)
Auth = scope.Auth
Auth.Account.create_new_account_x \
, enabled = True, superuser = True, suspended = False
)
Auth.Account.create_new_account_x \
, enabled = True, suspended = False
)
Auth.Account.create_new_account_x \
, enabled = True, superuser = True, suspended = False
)
Auth.Account.create_new_account_x \
, enabled = True, superuser = True, suspended = False
)
Auth.Account.create_new_account_x \
, enabled = True, superuser = True, suspended = False
)
Auth.Group ("FFG")
Auth.Group ("FFG-admin")
Auth.Account_in_Group ("[email protected]", "FFG")
# end def create
if __name__ == "__main__" :
from Command import *
db_url = sos.environ.get ("DB_url", "hps://")
db_name = sos.environ.get ("DB_name", None)
scope = command.scope (db_url, db_name, False)
TFL.Environment.py_shell ()
### __END__ fixtures