Coverage for .tox / coverage / lib / python3.11 / site-packages / wuttaweb / emails.py: 100%

8 statements  

« prev     ^ index     » next       coverage.py v7.13.1, created at 2025-12-28 15:23 -0600

1# -*- coding: utf-8; -*- 

2################################################################################ 

3# 

4# wuttaweb -- Web App for Wutta Framework 

5# Copyright © 2024-2025 Lance Edgar 

6# 

7# This file is part of Wutta Framework. 

8# 

9# Wutta Framework is free software: you can redistribute it and/or modify it 

10# under the terms of the GNU General Public License as published by the Free 

11# Software Foundation, either version 3 of the License, or (at your option) any 

12# later version. 

13# 

14# Wutta Framework is distributed in the hope that it will be useful, but 

15# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 

16# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 

17# more details. 

18# 

19# You should have received a copy of the GNU General Public License along with 

20# Wutta Framework. If not, see <http://www.gnu.org/licenses/>. 

21# 

22################################################################################ 

23""" 

24:term:`Email Settings <email setting>` for WuttaWeb 

25""" 

26 

27from wuttjamaican.email import EmailSetting 

28 

29 

30class feedback(EmailSetting): # pylint: disable=invalid-name,too-few-public-methods 

31 """ 

32 Sent when user submits feedback via the web app. 

33 """ 

34 

35 default_subject = "User Feedback" 

36 

37 def sample_data(self): # pylint: disable=empty-docstring 

38 """ """ 

39 model = self.app.model 

40 person = model.Person(full_name="Barney Rubble") 

41 user = model.User(username="barney", person=person) 

42 return { 

43 "user": user, 

44 "user_name": str(person), 

45 "user_url": "#", 

46 "referrer": "http://example.com/", 

47 "client_ip": "127.0.0.1", 

48 "message": "This app is cool but needs a new feature.\n\nAllow me to describe...", 

49 }