adding test CountryCountsByClickedBatchcodeProviderTest.test_getCountryCountsByClickedBatchcode_fromCityResolution()
This commit is contained in:
@@ -6,9 +6,9 @@ from CountryCountsByClickedBatchcodeProvider import CountryCountsByClickedBatchc
|
||||
|
||||
class CountryCountsByClickedBatchcodeProviderTest(unittest.TestCase):
|
||||
|
||||
def test_getCountryCountsByClickedBatchcode(self):
|
||||
def test_getCountryCountsByClickedBatchcode_fromCountryResolution(self):
|
||||
# Given
|
||||
|
||||
|
||||
# When
|
||||
countryCountsByClickedBatchcodeTable = CountryCountsByClickedBatchcodeProvider.getCountryCountsByClickedBatchcode('src/testdata/GoogleAnalytics/CountryByBatchcode 20230302-20230430.csv')
|
||||
|
||||
@@ -28,9 +28,9 @@ class CountryCountsByClickedBatchcodeProviderTest(unittest.TestCase):
|
||||
|
||||
def test_getCityCountsByClickedBatchcode(self):
|
||||
# Given
|
||||
|
||||
|
||||
# When
|
||||
cityCountsByClickedBatchcodeTable = CountryCountsByClickedBatchcodeProvider.getCityCountsByClickedBatchcode('src/testdata/GoogleAnalytics/CountryByBatchcode 20230730-20230929.csv')
|
||||
cityCountsByClickedBatchcodeTable = CountryCountsByClickedBatchcodeProvider._getCityCountsByClickedBatchcode('src/testdata/GoogleAnalytics/CountryByBatchcode 20230730-20230929.csv')
|
||||
|
||||
# Then
|
||||
assert_frame_equal(
|
||||
@@ -45,3 +45,21 @@ class CountryCountsByClickedBatchcodeProviderTest(unittest.TestCase):
|
||||
tuples = [['#003B21A', 'United States', 'California', 'Roseville'],
|
||||
['000086A', 'Germany', 'Bavaria', 'Nordlingen'],
|
||||
['000086A', 'Germany', 'Bavaria', 'Nuremberg']])))
|
||||
|
||||
def test_getCountryCountsByClickedBatchcode_fromCityResolution(self):
|
||||
# Given
|
||||
|
||||
# When
|
||||
countryCountsByClickedBatchcodeTable = CountryCountsByClickedBatchcodeProvider.getCountryCountsByClickedBatchcode('src/testdata/GoogleAnalytics/CountryByBatchcode 20230730-20230929.csv')
|
||||
|
||||
# Then
|
||||
assert_frame_equal(
|
||||
countryCountsByClickedBatchcodeTable,
|
||||
TestHelper.createDataFrame(
|
||||
columns = ['COUNTRY_COUNT_BY_VAX_LOT'],
|
||||
data = [ [100],
|
||||
[10 + 20]],
|
||||
index = pd.MultiIndex.from_tuples(
|
||||
names = ['VAX_LOT', 'COUNTRY'],
|
||||
tuples = [['#003B21A', 'United States'],
|
||||
['000086A', 'Germany']])))
|
||||
|
||||
Reference in New Issue
Block a user