Hi Devs

I found some one functionality problems (not bugs) with current API of 
Proteus 2.6.0, for example: a specific problem occurs when a user try 
connect to a database existing, but the name database is enter wrong from 
input, then proteus try creates (and create it!) a new database with the 
wrong name, this behaviour is strange because a user/dev hope simply that 
the connection is rejected, IMHO the creation of a database of proteus must 
be explicit ever  with for a example a method in the config.py file.

Case when the database exist "MYDB" and data of connection is fine:

>>> from proteus import config
>>> connector = config.TrytondConfig()
>>> response = connector.connection(database_name='MYDB', user='admin', 
password='')
>>> print response
True

Case when the database exist "MYDB" and data of connection is bad:

>>> from proteus import config
>>> connector = config.TrytondConfig()
>>> response = connector.connection(database_name='MYDBNAMEWRONG', 
user='admin_wrong', password='')
>>> print response
False

Case when the database doesn't exist and the user wants create it:

>>> from proteus import config
>>> connector = config.TrytondConfig()
>>> connector.new_database('MYDB_TEST', 'postgresql')
>>> response = connector.connection(database_name='MYDB_TEST', 
user='admin', password='')
>>> print response
True

In this moment I have a patch, working in 2.6.0 version, but I'd like 
upload a codereview.

Atte,

Oscar Alvarez
Presik Technologies

-- 
-- 
[email protected] mailing list

--- 
You received this message because you are subscribed to the Google Groups 
"tryton-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to