Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: TT-384 revert changes
  • Loading branch information
Jobzi authored Nov 8, 2021
commit 169853a8df89d6579ce9d437258b219b18de8268
4 changes: 2 additions & 2 deletions tests/commons/data_access_layer/file_stream_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

from commons.data_access_layer.file_stream import FileStream

fs = FileStream("storageaccounteystr82c5","tt-common-files")
fs = FileStream("storagefiles2","ioetfiles")

def test_get_file_stream_return_file_when_enter_file_name():
result = fs.get_file_stream("activity_test.json")
result = fs.get_file_stream("activity.json")

assert len(json.load(result)) == 15

Expand Down
13 changes: 0 additions & 13 deletions tests/time_tracker_api/activities/activities_model_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,16 +64,3 @@ def test_create_activity_should_add_active_status(
activity_repository_create_mock.assert_called_with(
data=expect_argument, event_context=ANY
)


def test_find_all_from_blob_storage(
event_context: EventContext,
activity_repository: ActivityCosmosDBRepository,
):
activity_repository.container = Mock()

result = activity_repository.find_all_from_blob_storage(
event_context=event_context,
file_name="activity_test.json"
)
assert len(result) == 15
14 changes: 3 additions & 11 deletions tests/time_tracker_api/activities/activities_namespace_test.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from unittest.mock import ANY
import pytest

from faker import Faker
from flask import json
from flask.testing import FlaskClient
Expand All @@ -18,14 +18,6 @@

fake_activity = ({"id": fake.random_int(1, 9999)}).update(valid_activity_data)

def test_get_all_activities_return_list_activities_when_send_get_request(
client: FlaskClient, valid_header: dict
):
response = client.get(
"/activities", headers=valid_header, follow_redirects=True
)

assert HTTPStatus.OK == response.status_code

def test_create_activity_should_succeed_with_valid_request(
client: FlaskClient, mocker: MockFixture, valid_header: dict
Expand Down Expand Up @@ -63,7 +55,7 @@ def test_create_activity_should_reject_bad_request(
assert HTTPStatus.BAD_REQUEST == response.status_code
repository_create_mock.assert_not_called()

@pytest.mark.skip(reason="There is currently no way to test this. Getting the value of the azure blob storage")

def test_list_all_active(
client: FlaskClient, mocker: MockFixture, valid_header: dict
):
Expand All @@ -89,7 +81,7 @@ def test_list_all_active(
max_count=ANY,
)

@pytest.mark.skip(reason="There is currently no way to test this. Getting the value of the azure blob storage")

def test_list_all_active_activities(
client: FlaskClient, mocker: MockFixture, valid_header: dict
):
Expand Down
Loading