Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests! #16

Open
29 of 97 tasks
mabrownnyu opened this issue Feb 28, 2019 · 0 comments
Open
29 of 97 tasks

Tests! #16

mabrownnyu opened this issue Feb 28, 2019 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@mabrownnyu
Copy link
Collaborator

mabrownnyu commented Feb 28, 2019

TESTS

Tests for get_captions

Located in test_captions_methods.py

Function Tested

def get_captions(self, video_id, lang_code='en', parser=P.parse_caption_track, **kwargs)

TO DO

  • parser
  • LIST OF VALID VIDEO IDS DOES NOT WORK AND I HAVE NO IDEA WHY
  • video_id
  • lang_code

Tests for get_channel_id_from_user

Located in test_channel_methods.py

Function Tested

def get_channel_id_from_user(self, username, **kwargs)

TO DO

  • get_channel_id_from_user

Tests for get_channel_metadata_gen

Located in test_channel_methods.py

Function Tested

def get_channel_metadata_gen(self, channel_id, parser=P.parse_channel_metadata, part=["id", "snippet", "contentDetails", "statistics", "topicDetails", "brandingSettings"], **kwargs)

TO DO

  • channel_id for list
  • channel_id for individual string
  • parser
  • part

Tests for get_channel_metadata

Located in test_channel_methods.py

Function Tested

def get_channel_metadata(self, channel_id, parser=P.parse_channel_metadata, part=["id", "snippet", "contentDetails", "statistics", "topicDetails", "brandingSettings"], **kwargs)

TO DO

  • channel_id for list
  • channel_id for individual string
  • parser
  • part

Tests for get_subscriptions

Located in test_channel_methods.py

Function Tested

def get_subscriptions(self, channel_id, next_page_token=False, parser=P.parse_subscription_descriptive, part=['id', 'snippet'], **kwargs)

TO DO

  • channel_id for list
  • channel_id for individual string
  • parser
  • part
  • next page token

Tests for get_featured_channels

Located in test_channel_methods.py

Function Tested

def get_featured_channels(self, channel_id, parser=P.parse_featured_channels, **kwargs)

TO DO

  • channel_id for list
  • channel_id for individual string
  • parser
  • part
  • next page token

Tests for get_featured_channels_gen

Located in test_channel_methods.py

Function Tested

def get_featured_channels_gen(self, channel_id, parser=P.parse_featured_channels, part=["id", "brandingSettings"], **kwargs)

TO DO

  • channel_id for list
  • channel_id for individual string
  • parser
  • part
  • next page token

Tests for __init__

Located in test_initialization.py

Function Tested

def __init__(self, key, api_version='3')

TO DO

  • test valid key
  • test invalid key

Tests for verify_key

Located in test_initialization.py

Function Tested

def verify_key(self)

TO DO

  • test valid key
  • test invalid key

Tests for get_playlists

Located in test_playlist_methods.py

Function Tested

def get_playlists(self, channel_id, next_page_token=False, parser=P.parse_playlist_metadata, part=['id','snippet','contentDetails'], **kwargs)

TO DO

  • channel_id
  • next_page_token
  • parser
  • part

Tests for get_video_from_playlist_id

Located in test_playlist_methods.py

Function Tested

def get_videos_from_playlist_id(self, playlist_id, next_page_token=None, published_after=datetime.datetime(1990,1,1), parser=P.parse_video_url, part=['snippet'], **kwargs)

TO DO

  • playlist_id
  • next_page_token
  • parser
  • part
  • published_after

Tests for search

Located in test_search_args.py

Function Tested

def search(self, q=None, channel_id=None, max_results=5, order_by="relevance", next_page_token=None, published_after=datetime.datetime(2000,1,1), published_before=datetime.datetime(3000,1,1), location=None, location_radius='1km', region_code=None, safe_search=None, relevance_language=None, event_type=None, topic_id=None, video_duration=None, search_type="video", parser=P.parse_rec_video_metadata, part=['snippet'], **kwargs)

TO DO

  • q
  • channel_id
  • max_results
  • published_after
  • published_before
  • topic_id
  • order_by
  • next_page_token
  • location
  • location_radius
  • region_code
  • safe_search
  • relevance_language
  • event_type
  • video_duration
  • search_type
  • parser
  • part

Tests for get_video_metadata_gen

Located in test_video_methods.py

Function tested

def get_video_metadata_gen(self, video_id, parser=P.parse_video_metadata, part=['statistics','snippet'], **kwargs)

TO DO

  • video_id
  • parser
  • part

Tests for get_video_metadata

Located in test_video_methods.py

Function tested

def get_video_metadata(self, video_id, parser=P.parse_video_metadata, part=['statistics','snippet'], **kwargs)

TO DO

  • video_id
  • parser
  • part

Tests for get_video_comments

Located in test_video_methods.py

Function tested

def get_video_comments(self, video_id, get_replies=True, max_results=None, next_page_token=False, parser=P.parse_comment_metadata, part = ['snippet'], **kwargs)

TO DO

  • video_id
  • get_replies
  • max_results
  • next_page_token
  • parser
  • part

Tests for get_recommended_videos

Located in test_video_methods.py

Function tested

def get_recommended_videos(self, video_id, max_results=5, parser=P.parse_rec_video_metadata, **kwargs)

TO DO

  • video_id
  • max_results
  • parser

Tests for test_videos_from_playlist.py

  • MERGE WITH THE ACTUAL TEST FILE FOR THIS SET OF PLAYLISTS in test_playlist_methods.py

Tests for Parsers

Located in test_parsers.py

Functions Tested

  • def raw_json(item)
  • def raw_json_with_datetime(item)
  • def parse_video_metadata(item)
  • def parse_video_url(item)
  • def parse_channel_metadata(item)
  • def parse_subscription_descriptive(item)
  • def parse_featured_channels(item)
  • def parse_playlist_metadata(item)
  • def parse_comment_metadata(item)
  • def parse_rec_video_metadata(item)
  • def parse_caption_track(item)

TO DO

  • raw_json
  • parse_video_metadata
  • parse_video_url
  • parse_channel_metadata
  • parse_featured_channels
  • parse_playlist_metadata
  • parse_comment_metadata
  • parse_rec_video_metadata
  • def raw_json_with_datetime(item)
  • def parse_caption_track(item)
  • def parse_subscription_descriptive(item)

Tests for Utils

Located in test_utils.py

Functions Tested

  • def _chunker(l, chunksize)
  • def _load_response(response)
  • def _text_from_html(html_body)
  • def parse_yt_datetime(date_str)
  • def strip_video_id_from_url(url)
  • def get_upload_playlist_id(channel_id)
  • def get_liked_playlist_id(channel_id)
  • def is_user(channel_url)
  • def strip_youtube_id(channel_url)
  • def get_channel_id_from_custom_url(url)
  • def get_url_from_video_id(video_id)

TO DO

  • get_upload_playlist_id
  • get_liked_playlist_id
  • parse_yt_datetime
  • strip_video_id_from_url
  • is_user
  • get_url_from_video_id
  • _chunker
  • _load_response
  • _text_from_html
  • strip_youtube_id
  • get_channel_id_from_custom_url
@mabrownnyu mabrownnyu added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers labels Feb 28, 2019
@mabrownnyu mabrownnyu changed the title Tests for test_captions.py Tests! Feb 28, 2019
@mabrownnyu mabrownnyu mentioned this issue Feb 28, 2019
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant