コード例 #1
0
ファイル: test_tab_items.py プロジェクト: superosku/piikki
 def test_user_from_other_team_cant_delete(self, logged_in_user, client,
                                           team):
     other_team = TeamFactory()
     tab_item = TabItemFactory(
         team=other_team,
         person=PersonFactory(team=other_team),
         adder=UserFactory(
             memberships=[TeamMembershipFactory.build(team=other_team)]),
         added_at=datetime.datetime.now())
     assert TabItem.query.count() == 1
     response = client.delete(
         url_for('api.tab_items_delete',
                 team_slug=other_team.slug,
                 tab_item_id=tab_item.id))
     assert response.status_code == 404
     assert TabItem.query.count() == 1
コード例 #2
0
ファイル: test_persons.py プロジェクト: superosku/piikki
 def logged_in_user(self, team):
     return UserFactory(memberships=[
         TeamMembershipFactory.build(team=team, is_admin=False)
     ])