fix(ui): show the PyPI release version in every version display

This commit is contained in:
2026-11-23 03:18:42 +00:00
parent f65c0cc1f3
commit bde9eebf3d
9 changed files with 195 additions and 21 deletions
+13
View File
@@ -0,0 +1,13 @@
package cache
import "testing"
func TestWithReleaseVersion(t *testing.T) {
with := withReleaseVersion(map[string]interface{}{"version": "six-1.17.0.tar.gz"}, "1.17.0")
if with["release_version"] != "1.17.0" || with["version"] != "six-1.17.0.tar.gz" {
t.Errorf("payload = %v", with)
}
if _, ok := withReleaseVersion(map[string]interface{}{"version": "1.3.0"}, "")["release_version"]; ok {
t.Error("empty release version must not be sent")
}
}