Changeset bddf042 in OpenWorkouts-current for ow/tests/models/test_root.py


Ignore:
Timestamp:
Feb 10, 2019, 7:56:34 AM (5 years ago)
Author:
Borja Lopez <borja@…>
Branches:
current, feature/docs, master
Children:
f29d4b4
Parents:
4226ce0
Message:

(#7) Allow users profiles to be accessed using a more friendly url:

https://openworkouts.org/profile/NICKNAME

IMPORTANT: This change adds a new index to the catalog, so ensure you
update any existing databases after pulling.

Enter pshell and run this code:

root._update_indexes()
for user in root.users:

root.reindex(user)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ow/tests/models/test_root.py

    r4226ce0 rbddf042  
    3535        # a new OpenWorkouts instance has a catalog created automatically
    3636        assert isinstance(root.catalog, Catalog)
    37         assert len(root.catalog) == 2
    38         assert 'email' in root.catalog
    39         assert 'sport' in root.catalog
     37        assert len(root.catalog) == 3
     38        for key in ['email', 'nickname', 'sport']:
     39            assert key in root.catalog
    4040
    4141    def test_add_user_ok(self, root):
Note: See TracChangeset for help on using the changeset viewer.