Mocks Package¶
ArchitectureImporter
Module¶
-
class
HPCStats.Tests.Mocks.ArchitectureImporter.
MockArchitectureImporter
(app, db, config, cluster_name)¶ Bases:
HPCStats.Importer.Architectures.ArchitectureImporter.ArchitectureImporter
BusinessCodeImporter
Module¶
-
class
HPCStats.Tests.Mocks.BusinessCodeImporter.
MockBusinessCodeImporter
(app, db, config)¶ Bases:
HPCStats.Importer.BusinessCodes.BusinessCodeImporter.BusinessCodeImporter
Conf
Module¶
MockConfigParser
Module¶
MockLdap
Module¶
-
class
HPCStats.Tests.Mocks.MockLdap.
MockLdap
¶ Bases:
object
Class with static methods to mock all used functions in psycogp2 module
-
static
initialize
(url)¶
-
static
set_option
(opt1, opt2)¶ Mock of ldap.set_options()
-
static
-
class
HPCStats.Tests.Mocks.MockLdap.
MockLdapConn
¶ Bases:
object
-
search_s
(req_dn, flag, req_search, attrs)¶
-
simple_bind
(dn, passwd)¶
-
-
HPCStats.Tests.Mocks.MockLdap.
fill_ldap_users
(ldap_config, users, users_no_group=None)¶
-
HPCStats.Tests.Mocks.MockLdap.
mock_ldap
()¶
MockPg2
Module¶
-
class
HPCStats.Tests.Mocks.MockPg2.
MockPsycopg2
¶ Bases:
object
Class with static methods to mock all used functions in psycogp2 module
-
static
connect
(conn)¶ Mock of psycopg2.connect()
-
static
-
class
HPCStats.Tests.Mocks.MockPg2.
MockPsycopg2Cursor
¶ Bases:
object
-
execute
(req, params=None)¶
-
fetchall
()¶
-
fetchone
()¶
-
rowcount
¶
-
-
class
HPCStats.Tests.Mocks.MockPg2.
PgReq
(req)¶ Bases:
object
Class for easy manipulation of fake PostgreSQL requests use by following Mock Psycopg2 classes, for testing purpose only.
-
set_assoc
(params, result)¶ Set an association params/result to the PgReq.
-
-
HPCStats.Tests.Mocks.MockPg2.
init_reqs
()¶
-
HPCStats.Tests.Mocks.MockPg2.
mock_psycopg2
()¶
MySQLdb
Module¶
-
class
HPCStats.Tests.Mocks.MySQLdb.
MockMySQLdb
¶ Bases:
object
Class with static methods to mock all used functions in MySQLdb module
-
static
connect
(host, user, passwd, db, port)¶ Mock of MySQLdb.connect()
-
static
-
class
HPCStats.Tests.Mocks.MySQLdb.
MockMySQLdbConnect
(host, user, passwd, db, port)¶ Bases:
object
-
close
()¶
-
cursor
(stuff=None)¶
-
-
class
HPCStats.Tests.Mocks.MySQLdb.
MockMySQLdbCursor
¶ Bases:
object
-
close
()¶
-
execute
(req, params=None)¶
-
fetchall
()¶
-
fetchone
()¶
-
-
HPCStats.Tests.Mocks.MySQLdb.
mock_mysqldb
()¶
ProjectImporter
Module¶
-
class
HPCStats.Tests.Mocks.ProjectImporter.
MockProjectImporter
(app, db, config)¶ Bases:
HPCStats.Importer.Projects.ProjectImporter.ProjectImporter
UserImporter
Module¶
-
class
HPCStats.Tests.Mocks.UserImporter.
MockUserImporter
(app, db, config, cluster)¶