Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
hypha
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ots
hypha
Commits
a49f7500
Commit
a49f7500
authored
7 years ago
by
Todd Dembrey
Browse files
Options
Downloads
Patches
Plain Diff
Add basic phase model
parent
3d6b912e
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
opentech/apply/tests/test_workflow.py
+8
-1
8 additions, 1 deletion
opentech/apply/tests/test_workflow.py
opentech/apply/workflow.py
+5
-0
5 additions, 0 deletions
opentech/apply/workflow.py
with
13 additions
and
1 deletion
opentech/apply/tests/test_workflow.py
+
8
−
1
View file @
a49f7500
from
django.test
import
SimpleTestCase
from
django.test
import
SimpleTestCase
from
django.forms
import
Form
from
django.forms
import
Form
from
opentech.apply.workflow
import
Stage
,
Workflow
from
opentech.apply.workflow
import
Phase
,
Stage
,
Workflow
from
.factories
import
StageFactory
,
WorkflowFactory
from
.factories
import
StageFactory
,
WorkflowFactory
...
@@ -40,3 +40,10 @@ class TestStageCreation(SimpleTestCase):
...
@@ -40,3 +40,10 @@ class TestStageCreation(SimpleTestCase):
stage
=
Stage
(
name
,
form
)
stage
=
Stage
(
name
,
form
)
self
.
assertEqual
(
stage
.
name
,
name
)
self
.
assertEqual
(
stage
.
name
,
name
)
self
.
assertEqual
(
stage
.
form
,
form
)
self
.
assertEqual
(
stage
.
form
,
form
)
class
TestPhaseCreation
(
SimpleTestCase
):
def
test_can_create_phase
(
self
):
name
=
'
the_phase
'
phase
=
Phase
(
name
)
self
.
assertEqual
(
phase
.
name
,
name
)
This diff is collapsed.
Click to expand it.
opentech/apply/workflow.py
+
5
−
0
View file @
a49f7500
...
@@ -29,3 +29,8 @@ class Stage:
...
@@ -29,3 +29,8 @@ class Stage:
def
__init__
(
self
,
name
:
str
,
form
:
Form
)
->
None
:
def
__init__
(
self
,
name
:
str
,
form
:
Form
)
->
None
:
self
.
name
=
name
self
.
name
=
name
self
.
form
=
form
self
.
form
=
form
class
Phase
:
def
__init__
(
self
,
name
:
str
)
->
None
:
self
.
name
=
name
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment