-
Notifications
You must be signed in to change notification settings - Fork 0
/
fixtures.py
59 lines (56 loc) · 1.86 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
# -*- 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 FFW.
#
# 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`
# ««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.Group ("FFW")
Auth.Group ("FFW-admin")
Auth.Account_in_Group ("[email protected]", "FFW")
# 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