MCPcopy
hub / github.com/perkeep/perkeep / MakeTestData

Method MakeTestData

pkg/importer/swarm/testdata.go:47–146  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

45}
46
47func (im *imp) MakeTestData() http.RoundTripper {
48
49 const nCheckins = 150 // Arbitrary number of checkins generated.
50
51 // if you add another venue, make sure the venueCounter reset
52 // in fakeCheckinsList allows for that case to happen.
53 // We could use global vars instead, but don't want to pollute the
54 // fousquare pkg namespace.
55 towns := map[int]*venueLocationItem{
56 0: {
57 Address: "Baker street",
58 City: "Dublin",
59 PostalCode: "0",
60 State: "none",
61 Country: "Ireland",
62 Lat: 53.4053427,
63 Lng: -8.3320801,
64 },
65 1: {
66 Address: "Fish&Ships street",
67 City: "London",
68 PostalCode: "1",
69 State: "none",
70 Country: "England",
71 Lat: 55.3617609,
72 Lng: -3.4433238,
73 },
74 2: {
75 Address: "Haggis street",
76 City: "Glasgow",
77 PostalCode: "2",
78 State: "none",
79 Country: "Scotland",
80 Lat: 57.7394571,
81 Lng: -4.686997,
82 },
83 3: {
84 Address: "rue du croissant",
85 City: "Grenoble",
86 PostalCode: "38000",
87 State: "none",
88 Country: "France",
89 Lat: 45.1841655,
90 Lng: 5.7155424,
91 },
92 4: {
93 Address: "burrito street",
94 City: "San Francisco",
95 PostalCode: "94114",
96 State: "CA",
97 Country: "US",
98 Lat: 37.7593625,
99 Lng: -122.4266995,
100 },
101 }
102
103 // We need to compute the venueIds in advance, because the venue id is used as a parameter
104 // in some of the requests we need to register.

Callers

nothing calls this directly

Calls 8

RefFromStringFunction · 0.92
StaticResponderFunction · 0.92
FileResponderFunction · 0.92
NewFakeTransportFunction · 0.92
fakeCheckinsListFunction · 0.85
DigestPrefixMethod · 0.80
fakePhotosListFunction · 0.70
fakePhotoFunction · 0.70

Tested by

no test coverage detected