Refactor fc_sort and add unit tests
Clean up fc_sort to facilitate the migration to Python3. Use PEP8 for
naming scheme.
Test: atest --host fc_sort_test
Bug: 200119288
Change-Id: Ia2c40a850a48ec75e995d5233b5abaae10917a89
diff --git a/tests/policy.py b/tests/policy.py
index 40229b8..4648e30 100644
--- a/tests/policy.py
+++ b/tests/policy.py
@@ -271,7 +271,7 @@
PathType = []
for i in range(index, len(self.__FcSorted)):
if MatchPathPrefix(self.__FcSorted[i].path, prefix):
- PathType.append((self.__FcSorted[i].path, self.__FcSorted[i].Type))
+ PathType.append((self.__FcSorted[i].path, self.__FcSorted[i].type))
return PathType
# Return types that match MatchPrefixes but do not match
@@ -430,7 +430,7 @@
self.__FcDict[t] = [rec[0]]
except:
pass
- self.__FcSorted = fc_sort.FcSort(FcPaths)
+ self.__FcSorted = fc_sort.sort(FcPaths)
# load policy
def __InitPolicy(self, PolicyPath):