Conditions | 1 |
Total Lines | 19 |
Code Lines | 15 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | # -*- coding: utf-8 -*- |
||
12 | def test_create(self): |
||
13 | self.session.flush() |
||
14 | transaction.commit() |
||
15 | name = 'Damien' |
||
16 | email = '[email protected]' |
||
17 | |||
18 | user = User() |
||
19 | user.display_name = name |
||
20 | user.email = email |
||
21 | |||
22 | self.session.add(user) |
||
23 | self.session.flush() |
||
24 | transaction.commit() |
||
25 | |||
26 | new_user = self.session.query(User).filter(User.display_name==name).one() |
||
27 | |||
28 | eq_(new_user.display_name, name) |
||
29 | eq_(new_user.email, email) |
||
30 | eq_(new_user.email_address, email) |
||
31 | |||
44 |
The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:
If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.