Skip to content

Commit

Permalink
nit
Browse files Browse the repository at this point in the history
  • Loading branch information
chrabyrd committed Apr 3, 2024
1 parent 5f9520b commit 84acf1a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 15 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,14 @@ jobs:
coverage json
- name: Upload coverage report as artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: coverage-report
path: |
coverage.json
.coverage
update-coverage:
check-coverage:
runs-on: ubuntu-latest
needs: [build]
steps:
Expand All @@ -90,7 +90,7 @@ jobs:
echo "$baseline_coverage" > .coverage_baseline
- name: Download coverage report artifact
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: coverage-report
path: .
Expand Down
22 changes: 10 additions & 12 deletions tests/search_indexes/sample_index_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,19 @@

class TestSampleIndex(ArchesTestCase):
def test_prepare_index(self):
pass
# sample_index = SampleIndex(index_name="Sample Index")
# sample_index.prepare_index()
sample_index = SampleIndex(index_name="Sample Index")
sample_index.prepare_index()

# expected_index_metadata = {"mappings": {"properties": {"tile_count": {"type": "keyword"}, "graph_id": {"type": "keyword"}}}}
# self.assertEqual(sample_index.index_metadata, expected_index_metadata)
expected_index_metadata = {"mappings": {"properties": {"tile_count": {"type": "keyword"}, "graph_id": {"type": "keyword"}}}}
self.assertEqual(sample_index.index_metadata, expected_index_metadata)

def test_get_documents_to_index(self):
pass
# sample_index = SampleIndex(index_name="Sample Index")
sample_index = SampleIndex(index_name="Sample Index")

# mock_resourceinstance = Mock(graph_id="test_graph_id")
# mock_tiles = [Mock(), Mock(), Mock()] # Mock tiles list
mock_resourceinstance = Mock(graph_id="test_graph_id")
mock_tiles = [Mock(), Mock(), Mock()] # Mock tiles list

# documents, doc_id = sample_index.get_documents_to_index(mock_resourceinstance, mock_tiles)
documents, doc_id = sample_index.get_documents_to_index(mock_resourceinstance, mock_tiles)

# self.assertEqual(documents, {"tile_count": len(mock_tiles), "graph_id": mock_resourceinstance.graph_id})
# self.assertEqual(doc_id, str(mock_resourceinstance.resourceinstanceid))
self.assertEqual(documents, {"tile_count": len(mock_tiles), "graph_id": mock_resourceinstance.graph_id})
self.assertEqual(doc_id, str(mock_resourceinstance.resourceinstanceid))

0 comments on commit 84acf1a

Please sign in to comment.