Files
pack/core/providers/python/django_test.go
T
zeekay 7844a60aff refactor(pack): modernize to github.com/hanzoai/pack and remove upstream branding
- Migrate module path to github.com/hanzoai/pack across all Go packages
- Remove legacy upstream docs and competitor brand references
- Modernize LLM.md and mise.toml for pristine Hanzo Pack builder
2026-09-04 00:40:42 -07:00

45 lines
977 B
Go

package python
import (
"testing"
testingUtils "github.com/hanzoai/pack/core/testing"
"github.com/stretchr/testify/require"
)
func TestDjango(t *testing.T) {
tests := []struct {
name string
path string
appName string
startCmd string
}{
{
name: "django project",
path: "../../../examples/python-django",
appName: "mysite.wsgi",
startCmd: "python manage.py migrate && gunicorn --bind 0.0.0.0:${PORT:-8000} mysite.wsgi:application",
},
{
name: "non-django project",
path: "../../../examples/python-uv",
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
ctx := testingUtils.CreateGenerateContext(t, tt.path)
provider := PythonProvider{}
err := provider.Initialize(ctx)
require.NoError(t, err)
appName := provider.getDjangoAppName(ctx)
require.Equal(t, tt.appName, appName)
startCmd := provider.getDjangoStartCommand(ctx)
require.Equal(t, tt.startCmd, startCmd)
})
}
}