Coverage for functions \ flipdare \ generated \ shared \ model \ dare \ dare_status.py: 100%

0 statements  

« prev     ^ index     » next       coverage.py v7.13.0, created at 2026-05-08 12:22 +1000

1#!/usr/bin/env python 

2# 

3# Copyright (c) 2026 Flipdare Pty Ltd. All rights reserved. 

4# 

5# This file is part of Flipdare's proprietary software and contains 

6# confidential and copyrighted material. Unauthorised copying, 

7# modification, distribution, or use of this file is strictly 

8# prohibited without prior written permission from Flipdare Pty Ltd. 

9# 

10# This software includes third-party components licensed under MIT, 

11# BSD, and Apache 2.0 licences. See THIRD_PARTY_NOTICES for details. 

12# 

13# NOTE: THIS FILE IS AUTO GENERATED. DO NOT EDIT. 

14# 

15# Generated by codegen_models.py 

16# 

17# Modify 'codegen_models.py' 

18# and re-run the script above to update. 

19# 

20 

21# pragma: no cover 

22from enum import StrEnum 

23 

24 

25class DareStatus(StrEnum): 

26 """Dare Status""" 

27 

28 DRAFT = "draft" 

29 SUBMITTED = "submitted" 

30 RESUBMITTED = "resubmitted" 

31 OPEN = "open" 

32 REJECTED = "rejected" 

33 WITHDRAWN = "withdrawn" 

34 ACCEPTED = "accepted" 

35 COMPLETED = "completed" 

36 VOTING = "voting" 

37 VOTE_REJECTED = "voting" 

38 PAY_OUT = "pay_out" 

39 FINALIZED = "finalized" 

40 TIMED_OUT = "timed_out" 

41 REVIEW_REQUIRED = "review_required" 

42 FLAGGED = "flagged" 

43 ERROR = "error" 

44 

45 # ---- Convenience predicates ----------------------------------------- 

46 @property 

47 def requires_processing(self) -> bool: 

48 return self in { 

49 DareStatus.SUBMITTED, 

50 DareStatus.RESUBMITTED, 

51 DareStatus.REVIEW_REQUIRED, 

52 } 

53 

54 @property 

55 def requires_moderation(self) -> bool: 

56 return self in { 

57 DareStatus.SUBMITTED, 

58 } 

59 

60 @property 

61 def is_rejected(self) -> bool: 

62 return self in { 

63 DareStatus.REJECTED, 

64 DareStatus.WITHDRAWN, 

65 } 

66 

67 @property 

68 def is_voting(self) -> bool: 

69 return self == DareStatus.VOTING 

70 

71 @property 

72 def is_completing(self) -> bool: 

73 return self in { 

74 DareStatus.COMPLETED, 

75 DareStatus.VOTING, 

76 DareStatus.PAY_OUT, 

77 } 

78 

79 @property 

80 def is_complete(self) -> bool: 

81 return self in { 

82 DareStatus.COMPLETED, 

83 DareStatus.PAY_OUT, 

84 DareStatus.FINALIZED, 

85 }